Free

Frees a previously allocated memory block.

Library:LibC
Classification:NetWare OS
Service:NetWare Platform

Syntax

  #include <netware.h> 
   
  void Free (
     void   *addr);
  

Parameters

addr

(IN) Points to a memory block previously allocated by calling Alloc or AllocSleepOK.

Remarks

The Free function deallocates the memory block specified by the addr parameter.

After calling Free, the freed memory block is available for allocation or garbage collection. The memory that has been freed should no longer be accessed. Writing data to a freed memory block results in memory corruption. Reading data from a freed memory block has unpredictable results because the memory block might have been reused.

Free should not be used to return memory allocated by standard C functions (such as malloc, realloc, and calloc). If you use the memory tracking features of LibC and use Free when you should use free, memory tracking is not accurate and can report erroneous debugging information and statistics.

See Also