malloc

Allocates a block of memory

Local Servers:blocking
Remote Servers:N/A
Classification:ANSI
Service:Memory Allocation

Syntax

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

Parameters

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

Return Values

malloc returns a pointer to the start of the newly allocated memory. The return value is NULL if insufficient memory is available or if the requested size is 0.

Remarks

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

The malloc function blocks only if the allocated block is greater than or equal to the size of cache_buffer+constant.

See Also

calloc, free, realloc

Example

  #include <nwmalloc.h>  
  #include <stdlib.h> 
   
  main ()  
  {  
     char      *memoryPointer;  
     size_t    size;  
     memoryPointer = malloc (size);  
  }