malloc

Allocates a block of memory.

Library:LibC
Classification:ANSI
Service:Memory Management

Syntax

  #include <stdlib.h> 
   
  void *malloc (
     size_t   size);
  

Parameters

size

(IN) Specifies the size (in bytes) of the memory block.

Return Values

Returns a pointer to the start of the newly allocated memory. If insufficient memory is available or if the requested size is 0, returns NULL.

Remarks

Memory allocation is not limited to 64 KB. The size parameter is 32 bits.

See Also