library_calloc

Allocates and clears memory for the specified NLM.

Library:LibC
Service:Library

Syntax

  #include <library.h> 
   
  void *library_calloc   (
     void    *handle, 
     size_t   size, 
     size_t   count);
  

Parameters

handle

(IN) Points to the handle for the NLM.

size

(IN) Specifies the size (in bytes) of each object.

count

(IN) Specifies the number of objects.

Return Values

If successful, returns a pointer to the start of the allocated memory. Otherwise, returns NULL if insufficient memory is available or if the value of the size parameter is 0.

Remarks

The library_calloc function initializes all memory to zero.

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

You should free any memory allocated using the library_calloc function with the free or library_free functions.

See Also