Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

mkl_realloc

Changes the size of memory buffer allocated by mkl_malloc/mkl_calloc.

Syntax

a_ptr = mkl_realloc( ptr, size )

Fortran Include Files/Modules
  • Include file: mkl.fi
  • Module (compiled): mkl_service.mod
  • Module (source): mkl_service.f90
Input Parameters

Name

Type

Description

ptr

POINTER

Pointer to the memory buffer allocated by the mkl_malloc or mkl_calloc function or a NULL pointer.

size

INTEGER*4 for 32-bit systems
INTEGER*8 for 64-bit systems

New size of the buffer.

Description

The function changes the size of the memory buffer allocated by the mkl_malloc or mkl_calloc function to size bytes. The first bytes of the returned buffer up to the minimum of the old and new sizes keep the content of the input buffer. The returned memory buffer can have a different location than the input one. If ptr is NULL, the function works as mkl_malloc.

Return Values

Name

Type

Description

a_ptr

POINTER

  • Pointer to the re-allocated buffer if re-allocation is successful.

  • NULL if re-allocation is unsuccessful.