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


  

PoolDeallocate

OSStatus PoolDeallocate (LogicalAddress address);
--> address
Address of pool memory chunk to deallocate.
DESCRIPTION

The PoolDeallocate routine returns the chunk of memory at address to the pool from which it was allocated. It can be used to deallocate memory that was allocated with PoolAllocateResident.

EXECUTION CONTEXT

PoolDeallocate may be called only from task level, not from secondary or hardware interrupt level.

RESULT CODES
noErr 0 No error
qErr -1 Queue element not found
memFullErr -108 Not enough room in heap
CODE SAMPLE

The code shown in Listing 11-2 uses PoolDeallocate to dispose of a property that was obtained by calling the RegistryPropertyGet function.

Listing 11-2 Disposing of a property

void DisposeThisProperty(
    RegPropertyValue    *regPropertyValuePtr
    )
{
        if(*regPropertyValuePtr!=NULL){
            PoolDeallocate(*regPropertyValuePtr);
            *regPropertyValuePtr=NULL;
        }
}

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