word hb_descr; /* object descriptor for marking. See */
/* mark.h. */
# ifdef MARK_BIT_PER_GRANULE
- short * hb_map; /* Essentially a table of remainders */
+ unsigned short * hb_map; /* Essentially a table of remainders */
/* mod BYTES_TO_GRANULES(hb_sz), except */
/* for large blocks. See GC_obj_map. */
# endif
/* number of bytes. */
# ifdef MARK_BIT_PER_GRANULE
# define GC_obj_map GC_arrays._obj_map
- short * _obj_map[MAXOBJGRANULES+1];
+ unsigned short * _obj_map[MAXOBJGRANULES + 1];
/* If not NULL, then a pointer to a map of valid */
/* object addresses. */
/* _obj_map[sz_in_granules][i] is */
GC_INNER GC_bool GC_add_map_entry(size_t granules)
{
unsigned displ;
- short * new_map;
+ unsigned short * new_map;
if (granules > BYTES_TO_GRANULES(MAXOBJBYTES)) granules = 0;
if (GC_obj_map[granules] != 0) {
return(TRUE);
}
- new_map = (short *)GC_scratch_alloc(MAP_LEN * sizeof(short));
+ new_map = (unsigned short *)GC_scratch_alloc(MAP_LEN * sizeof(short));
if (new_map == 0) return(FALSE);
GC_COND_LOG_PRINTF(
"Adding block map for size of %u granules (%u bytes)\n",
}
} else {
for (displ = 0; displ < BYTES_TO_GRANULES(HBLKSIZE); displ++) {
- new_map[displ] = (short)(displ % granules);
+ new_map[displ] = (unsigned short)(displ % granules);
}
}
GC_obj_map[granules] = new_map;