//\r
// List of pool header to search for the appropriate memory type.\r
//\r
-LIST_ENTRY mPoolHeadList;\r
+LIST_ENTRY mPoolHeadList = INITIALIZE_LIST_HEAD_VARIABLE (mPoolHeadList);\r
\r
\r
/**\r
InitializeListHead (&mPoolHead[Type].FreeList[Index]);\r
}\r
}\r
- InitializeListHead (&mPoolHeadList);\r
}\r
\r
\r
\r
DEBUG ((\r
DEBUG_POOL,\r
- "AllocatePoolI: Type %x, Addr %x (len %x) %,d\n", PoolType,\r
+ "AllocatePoolI: Type %x, Addr %p (len %lx) %,ld\n", PoolType,\r
Buffer,\r
- Size - POOL_OVERHEAD,\r
- Pool->Used\r
+ (UINT64)(Size - POOL_OVERHEAD),\r
+ (UINT64) Pool->Used\r
));\r
\r
//\r
Pool->Used += Size;\r
\r
} else {\r
- DEBUG ((DEBUG_ERROR | DEBUG_POOL, "AllocatePool: failed to allocate %d bytes\n", Size));\r
+ DEBUG ((DEBUG_ERROR | DEBUG_POOL, "AllocatePool: failed to allocate %ld bytes\n", (UINT64) Size));\r
}\r
\r
return Buffer;\r
UINTN Offset;\r
BOOLEAN AllFree;\r
\r
- ASSERT(NULL != Buffer);\r
+ ASSERT(Buffer != NULL);\r
//\r
// Get the head & tail of the pool entry\r
//\r
Head = CR (Buffer, POOL_HEAD, Data, POOL_HEAD_SIGNATURE);\r
- ASSERT(NULL != Head);\r
+ ASSERT(Head != NULL);\r
\r
if (Head->Signature != POOL_HEAD_SIGNATURE) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
Tail = HEAD_TO_TAIL (Head);\r
- ASSERT(NULL != Tail);\r
+ ASSERT(Tail != NULL);\r
\r
//\r
// Debug\r
return EFI_INVALID_PARAMETER;\r
}\r
Pool->Used -= Size;\r
- DEBUG ((DEBUG_POOL, "FreePool: %x (len %x) %,d\n", Head->Data, Head->Size - POOL_OVERHEAD, Pool->Used));\r
+ DEBUG ((DEBUG_POOL, "FreePool: %p (len %lx) %,ld\n", Head->Data, (UINT64)(Head->Size - POOL_OVERHEAD), (UINT64) Pool->Used));\r
\r
//\r
// Determine the pool list\r
// Put the pool entry onto the free pool list\r
//\r
Free = (POOL_FREE *) Head;\r
- ASSERT(NULL != Free);\r
+ ASSERT(Free != NULL);\r
Free->Signature = POOL_FREE_SIGNATURE;\r
Free->Index = (UINT32)Index;\r
InsertHeadList (&Pool->FreeList[Index], &Free->Link);\r
FSize = LIST_TO_SIZE(Index);\r
while (Offset + FSize <= DEFAULT_PAGE_ALLOCATION) {\r
Free = (POOL_FREE *) &NewPage[Offset];\r
- ASSERT(NULL != Free);\r
+ ASSERT(Free != NULL);\r
if (Free->Signature != POOL_FREE_SIGNATURE) {\r
AllFree = FALSE;\r
}\r
// Remove all of these pool entries from the free loop lists.\r
//\r
Free = (POOL_FREE *) &NewPage[0];\r
- ASSERT(NULL != Free);\r
+ ASSERT(Free != NULL);\r
Index = Free->Index;\r
Offset = 0;\r
\r
FSize = LIST_TO_SIZE(Index);\r
while (Offset + FSize <= DEFAULT_PAGE_ALLOCATION) {\r
Free = (POOL_FREE *) &NewPage[Offset];\r
- ASSERT(NULL != Free);\r
+ ASSERT(Free != NULL);\r
RemoveEntryList (&Free->Link);\r
Offset += FSize;\r
}\r