37#if DBG_ENABLE_EVENT_LOGGING
46#define GDI_POOL_ALLOCATION_GRANULARITY 64 * 1024
103 DPRINT1(
"There are %lu allocations left, section=%p, pool=%p\n",
126 ULONG ulIndex, cjOffset, ulPageBit;
128 PVOID pvAlloc, pvBaseAddress;
144 DPRINT1(
"pSection->cAllocCount=%lu, pPool->cSlotsPerSection=%lu\n",
168 DPRINT1(
"Couldn't allocate a section\n");
227 DPRINT(
"GdiPoolallocate: %p\n", pvAlloc);
241 DPRINT(
"GdiPoolFree: %p\n", pvAlloc);
259 if (cjOffset < pPool->cjSectionSize)
303 DbgPrint(
"failed to free. pvAlloc=%p, base=%p, size=%lx\n",
324 if (!pPool)
return NULL;
#define RtlInitializeBitMap
#define RtlFindClearBitsAndSet
#define RtlNumberOfSetBits
#define NT_SUCCESS(StatCode)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define InsertHeadList(ListHead, Entry)
#define IsListEmpty(ListHead)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
#define ExInitializePushLock
FORCEINLINE VOID ExAcquirePushLockExclusive(PEX_PUSH_LOCK PushLock)
FORCEINLINE VOID ExReleasePushLockExclusive(PEX_PUSH_LOCK PushLock)
#define DBG_LOGEVENT(pslh, type, val)
#define DBG_CLEANUP_EVENT_LIST(pslh)
#define DBG_DUMP_EVENT_LIST(pslh)
#define DBG_INITLOG(pslh)
struct _GDI_POOL GDI_POOL
PGDI_POOL NTAPI GdiPoolCreate(ULONG cjAllocSize, ULONG ulTag)
VOID NTAPI GdiPoolFree(PGDI_POOL pPool, PVOID pvAlloc)
static VOID GdiPoolDeleteSection(PGDI_POOL pPool, PGDI_POOL_SECTION pSection)
struct _GDI_POOL_SECTION * PGDI_POOL_SECTION
struct _GDI_POOL_SECTION GDI_POOL_SECTION
static PGDI_POOL_SECTION GdiPoolAllocateSection(PGDI_POOL pPool)
#define GDI_POOL_ALLOCATION_GRANULARITY
VOID NTAPI GdiPoolDestroy(PGDI_POOL pPool)
PVOID NTAPI GdiPoolAllocate(PGDI_POOL pPool)
#define KeLeaveCriticalRegion()
#define KeEnterCriticalRegion()
#define NtCurrentProcess()
void * EngAllocMem(int zero, unsigned long size, int tag=0)
struct _LIST_ENTRY * Flink
#define CONTAINING_RECORD(address, type, field)
_In_ ULONG _In_ ULONG ulTag
#define ADDRESS_AND_SIZE_TO_SPAN_PAGES(_Va, _Size)