64-bit fixes to Hoard.
This commit is contained in:
@@ -179,7 +179,7 @@ hoardSbrk(long size)
|
|||||||
|
|
||||||
if (chunk->size > (size_t)size + sizeof(free_chunk)) {
|
if (chunk->size > (size_t)size + sizeof(free_chunk)) {
|
||||||
// divide this chunk into smaller bits
|
// divide this chunk into smaller bits
|
||||||
uint32 newSize = chunk->size - size;
|
size_t newSize = chunk->size - size;
|
||||||
free_chunk *next = chunk->next;
|
free_chunk *next = chunk->next;
|
||||||
|
|
||||||
chunk = (free_chunk *)((addr_t)chunk + size);
|
chunk = (free_chunk *)((addr_t)chunk + size);
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ superblock::superblock(int numBlocks, // The number of blocks in the sb.
|
|||||||
// and insert the block pointers into the linked list.
|
// and insert the block pointers into the linked list.
|
||||||
for (int i = 0; i < _numBlocks; i++) {
|
for (int i = 0; i < _numBlocks; i++) {
|
||||||
// Make sure the block is on a double-word boundary.
|
// Make sure the block is on a double-word boundary.
|
||||||
assert(((unsigned int)b & hoardHeap::ALIGNMENT_MASK) == 0);
|
assert(((unsigned long)b & hoardHeap::ALIGNMENT_MASK) == 0);
|
||||||
new(b) block(this);
|
new(b) block(this);
|
||||||
assert(b->getSuperblock() == this);
|
assert(b->getSuperblock() == this);
|
||||||
b->setNext(_freeList);
|
b->setNext(_freeList);
|
||||||
|
|||||||
Reference in New Issue
Block a user