phdr -> hb_next = hhdr -> hb_next;
}
FREE_ASSERT(GC_free_bytes[index] >= hhdr -> hb_sz);
- INCR_FREE_BYTES(index, - (signed_word)(hhdr -> hb_sz));
+ INCR_FREE_BYTES(index, -(signed_word)(hhdr -> hb_sz));
if (0 != hhdr -> hb_next) {
hdr * nhdr;
GC_ASSERT(!IS_FORWARDING_ADDR_OR_NIL(NHDR(hhdr)));
GC_fail_count = 0;
GC_large_free_bytes -= size_needed;
-
GC_ASSERT(IS_MAPPED(hhdr));
return( hbp );
}
{
struct hblk *next, *prev;
hdr *hhdr, *prevhdr, *nexthdr;
- signed_word size;
+ word size;
GET_HDR(hbp, hhdr);
- size = hhdr->hb_sz;
- size = HBLKSIZE * OBJ_SZ_TO_BLOCKS(size);
- if (size <= 0)
+ size = HBLKSIZE * OBJ_SZ_TO_BLOCKS(hhdr->hb_sz);
+ if ((signed_word)size <= 0)
ABORT("Deallocating excessively large block. Too large an allocation?");
/* Probably possible if we try to allocate more than half the address */
/* space at once. If we don't catch it here, strange things happen */
/* later. */
- GC_remove_counts(hbp, (word)size);
+ GC_remove_counts(hbp, size);
hhdr->hb_sz = size;
# ifdef USE_MUNMAP
hhdr -> hb_last_reclaimed = (unsigned short)GC_gc_no;
GC_ASSERT(IS_MAPPED(hhdr));
hhdr -> hb_flags |= FREE_BLK;
- next = (struct hblk *)((word)hbp + size);
+ next = (struct hblk *)((ptr_t)hbp + size);
GET_HDR(next, nexthdr);
prev = GC_free_block_ending_at(hbp);
/* Coalesce with successor, if possible */