NPA_Return_Memory

Returns previously allocated memory to the system.

Thread Context:Non-Blocking

Syntax

    LONG NPA_Return_Memory (
       LONG   npaHandle,
       void  *virtualPointer
       );
    
    

Parameters

npaHandle
(IN) The CDM's or HAM's handle for using the NPA APIs, assigned during NPA_Register_CDM_Module or NPA_Register_HAM_Module, respectively.
virtualPointer
(IN) Points to the logical NetWare address of the memory block being returned to the system. The memory block must have been originally allocated using NPA_Allocate_Memory.

Return Values

The following table lists return values and descriptions.

zero

Successful

nonzero

Unsuccessful

Remarks

NPA_Return_Memory is used to return allocated system memory, such as special data structures or buffers required by a CDM or HAM, back to the system's memory pool.

To minimize impacts on overall server performance, CDMs and HAMs are expected to periodically clean up local memory. Local memory should be returned before unloading.

NPA_Return_Memory can be called during the context of any process, except a process within an interrupt level. Memory should not have been allocated at the interrupt level. This function is intended to return memory blocks that were allocated using NPA_Allocate_Memory.