NPA_Allocate_Memory
Allocates a block of system memory for local use of the module. The memory block is returnable to the system.
LONG NPA_Allocate_Memory ( LONG npaHandle, void **virtualPointer, void **physicalPointer, LONG bufferSize, LONG flag, LONG *sleptFlag );
The following table lists return values and descriptions.
NPA_Allocate_Memory is used to allocate system memory required by a CDM/HAM, such as special data structures or buffers. This allocation is on paragraph (16-byte) boundaries. The CDM/HAM must provide the storage locations (virtualPointer and physicalPointer) for the outputs it receives during this call.
NPA_Allocate_Memory is passed the two pointer-to-pointer variables and a buffer size. It allocates a memory block of the requested size and assigns its starting virtual address to one of the pointer-to-pointer variables and assigns its starting physical address to the other variable. The virtual address is the logical NetWare address of the allocated memory block. The physical address is the absolute hardware address of the allocated memory block, and it is provided to support adapters using DMA.
The memory allocated by this function is not initialized to any value. The CDM/HAM is responsible for initializing allocated memory. Additionally, this function may be called during the context of any process, except a process within an interrupt level. Memory should not be allocated at the interrupt level. Memory is returned to the system pool using NPA_Return_Memory.
If the CDM allocates a memory buffer to be accessed by a HAM, it must allocate the memory as an I/O buffer.
NOTE:If the requested size is less than 3888 bytes, the resulting memory is physically contiguous (regardless of the flag setting).