ExIsFullZone

BOOLEAN
ExIsFullZone(

IN PZONE_HEADER Zone
);

ExIsFullZone determines whether the given zone is full. A zone is considered full if its free list is empty.

Parameters

Zone

Points to the zone header to be tested.

Return Value

ExIsFullZone returns TRUE if an entry cannot be allocated from the zone when the call occurs.

Comments

This routine should always be called immediately before making a call to ExAllocateFromZone or ExInterlockedAllocateFromZone. If the return value is TRUE, the caller should back up the zone buffer by calling ExAllocatePool to get a temporary buffer it can use until the zone buffer has free blocks again.

Callers of ExIsFullZone usually run at IRQL <= DISPATCH_LEVEL. In particular, callers must be running at IRQL <= DISPATCH_LEVEL to make a subsequent call to ExAllocateFromZone or to ExInterlockedAllocateFromZone if the input Lock is used by any driver routine that runs at IRQL < DIRQL.

See Also

ExAllocateFromZone, ExAllocatePool, ExFreeToZone, ExInterlockedAllocateFromZone, ExInterlockedFreeToZone