NWGarbageCollect

Unfragments freed server memory

Local Servers:either blocking or nonblocking
Remote Servers:N/A
Classification:4.x, 5.x, 6.x
Service:Advanced

Syntax

  #include <nwmalloc.h>  
   
  void NWGarbageCollect  (  
     LONG   NLMHandle ;
  

Parameters

NLMHandle

(IN) Specifies an NLM handle through which freed server memory will be unfragmented.

Remarks

NWGarbageCollect provides a programmatic way to unfragment server memory before that memory is unfragmented automatically by the OS. If a large number of calls have been made to allocate memory, especially in small pieces, the NetWare 4.x, 5.x, and 6.x OS often fragments server memory, causing subsequent memory allocation calls to fail. A call to NWGarbageCollect with a valid NLM handle unfragments all server memory.

For the NLMHandle parameter, pass in the handle returned by a call to GetNLMHandle.

Blocking Information: Although NWGarbageCollect can block in some instances, it does not always do so.

See Also

FindNLMHandle, GetNLMHandle, MapNLMIDToHandle (NDK: NLM Threads Management)