PATH 
ADC Home > Documentation > Hardware > Device Managers and Drivers > PCI Card Services > Designing PCI Cards and Drivers for Power Macintosh Computers


  

MemAllocatePhysicallyContiguous

LogicalAddress MemAllocatePhysicallyContiguous (
                     ByteCount byteSize,
                     Boolean clear);
--> byteSize
The number of bytes of memory to allocate.
--> clear
Whether or not the allocated memory is to be zeroed.
DESCRIPTION

MemAllocatePhysicallyContiguous allocates a buffer that is resident and is guaranteed to be physically uninterrupted. It returns the buffer's logical address.

Driver code can pass the address returned by MemAllocatePhysicallyContiguous to PrepareMemoryForIO to obtain the buffer's physical location.

EXECUTION CONTEXT

MemAllocatePhysicallyContiguous may be called only from task level, not from secondary or hardware interrupt level. Requesting a larger size especially anytime after your driver initially starts up is unlikely to succeed.

RESULT CODES
noErr 0 No error
paramErr -50 Bad parameter
memFullErr -108 Not enough room in heap

© 1999 Apple Computer, Inc. – (Last Updated 26 March 99)