Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Networking With Open Transport / Part 2 - Open Transport Reference
Chapter 27 - Utilities Reference / Functions
Allocating and Freeing Memory /


OTAllocMem

Allocates memory from the Open Transport memory pool.

C INTERFACE
void* OTAllocMem(size_t nbytes)
C++ INTERFACE
None. C++ applications use the C interface to this function.

PARAMETERS
nbytes
The amount (in bytes) of memory to allocate.
DISCUSSION
The OTAllocMem function allocates raw memory from a pool that Open Transport creates for your application. This function returns a pointer to the allocated memory; pass the same pointer to the OTFreeMem function to deallocate this memory.

SPECIAL CONSIDERATIONS
You can call this routine at both hardware interrupt level and from a deferred task. You need to call the OTEnterInterrupt function before you make this call from a hardware interrupt.

SEE ALSO
The OTFreeMem function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998