Partial fix for DEBUG=1 build on a 64bit host
Signed-off-by: Matt Madia <mattmadia@gmail.com>
This commit is contained in:
parent
5693bf2fa9
commit
4ad0585ebc
@ -83,7 +83,7 @@ BBlockCache::BBlockCache(uint32 blockCount,
|
||||
block->next = fFreeList;
|
||||
fFreeList = block;
|
||||
DEBUG_ONLY(block->magic1 = MAGIC1);
|
||||
DEBUG_ONLY(block->magic2 = MAGIC2 + (uint32)block->next);
|
||||
DEBUG_ONLY(block->magic2 = MAGIC2 + (uint32)(addr_t)block->next);
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ BBlockCache::~BBlockCache()
|
||||
fLocker.Lock();
|
||||
while (fFreeList) {
|
||||
ASSERT(fFreeList->magic1 == MAGIC1);
|
||||
ASSERT(fFreeList->magic2 == MAGIC2 + (uint32)fFreeList->next);
|
||||
ASSERT(fFreeList->magic2 == MAGIC2 + (uint32)(addr_t)fFreeList->next);
|
||||
void *pointer = fFreeList;
|
||||
fFreeList = fFreeList->next;
|
||||
DEBUG_ONLY(memset(pointer, 0xCC, sizeof(_FreeBlock)));
|
||||
@ -111,7 +111,7 @@ BBlockCache::Get(size_t blockSize)
|
||||
if (blockSize == fBlockSize && fFreeList != 0) {
|
||||
// we can take a block from the list
|
||||
ASSERT(fFreeList->magic1 == MAGIC1);
|
||||
ASSERT(fFreeList->magic2 == MAGIC2 + (uint32)fFreeList->next);
|
||||
ASSERT(fFreeList->magic2 == MAGIC2 + (uint32)(addr_t)fFreeList->next);
|
||||
pointer = fFreeList;
|
||||
fFreeList = fFreeList->next;
|
||||
fFreeBlocks--;
|
||||
@ -138,7 +138,7 @@ BBlockCache::Save(void *pointer, size_t blockSize)
|
||||
fFreeList = block;
|
||||
fFreeBlocks++;
|
||||
DEBUG_ONLY(block->magic1 = MAGIC1);
|
||||
DEBUG_ONLY(block->magic2 = MAGIC2 + (uint32)block->next);
|
||||
DEBUG_ONLY(block->magic2 = MAGIC2 + (uint32)(addr_t)block->next);
|
||||
} else {
|
||||
DEBUG_ONLY(memset(pointer, 0xCC, sizeof(_FreeBlock)));
|
||||
fFree(pointer);
|
||||
|
Loading…
Reference in New Issue
Block a user