NWDPLibQMalloc

Allocates memory

Local Servers: nonblocking
Remote Servers: N/A
NetWare Server: 4.11, 5.x
Platform: NLM, Windows 95, Windows 98
Service: Distributed Print


Syntax

#include <nwdp_lib.h>  

N_EXTERN_LIBRARY (NWDPInitCode) NWDPLibQMalloc (
NWDPAccessorRef accessorRef,
pnptr resultMemPtr,
nint szMem);


Parameters

accessorRef

(IN) Specifies the NWDPAccessorData structure whose fields are accessed by using the provided error macros.


resultMemPtr

(OUT) Points to a pointer which will receive the newly allocated memory's address.


szMem

(IN) Specifies the size of memory to allocate.


Return Values

0x00000000

N_SUCCESS

0x030A0001

NWDP_EC_NO_MEMORY

0x030A0009

NWDP_EC_ARTIFICIAL_MEM_LIMIT

0xFFFFFFFE

NWDP_RC_INVALID_ACCESSOR

0xFFFFFFFF

N_FAILURE


Remarks

NWDPLibQMalloc is identical to NWDPLibMalloc except for the N_PLAT_NLM case when non-blocking _qmalloc is called instead of malloc.

NWDPLibQMalloc is not recommended except for applications which must use this library.

Any memory allocated by NWDPLibQMalloc is automatically freed when NWDPLibTerm is called.

The errors NWDP_EC_NO_MEMORY and NWDP_EC_ARTIFICIAL_MEM_LIMIT both return the following information:

The otherError field of the accessorRef will contain the size of the request made of the system ( szMem), and the otherError2 field of the accessorRef will contain the current memory allocation total made through NWDPLibxxxx entry points.