+2009-02-28 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
+ * alloc.c (GC_try_to_collect): Remove duplicate initialization
+ check.
+ * malloc.c (GC_generic_malloc): Remove lw to eliminate single-
+ threaded warnings.
+ * mallocx.c (GC_generic_malloc_ignore_off_page): Ditto.
+
2009-02-28 Hans Boehm <Hans.Boehm@hp.com> (Mostly Ivan Maidansky)
* allchblk.c, backgraph.c, dbg_mlc.c, dyn_load.c,
finalize.c, include/private/gc_pmark.h, malloc.c, mark.c,
GC_INVOKE_FINALIZERS();
LOCK();
ENTER_GC();
- if (!GC_is_initialized) GC_init_inner();
/* Minimize junk left in my registers */
GC_noop(0,0,0,0,0,0);
result = (int)GC_try_to_collect_inner(stop_func);
result = GC_generic_malloc_inner((word)lb, k);
UNLOCK();
} else {
- size_t lg, lw;
+ size_t lg;
size_t lb_rounded;
word n_blocks;
GC_bool init;
lg = ROUNDED_UP_GRANULES(lb);
- lw = GRANULES_TO_WORDS(lg);
lb_rounded = GRANULES_TO_BYTES(lg);
n_blocks = OBJ_SZ_TO_BLOCKS(lb_rounded);
init = GC_obj_kinds[k].ok_init;
/* before we release the lock. */
((word *)result)[0] = 0;
((word *)result)[1] = 0;
- ((word *)result)[lw-1] = 0;
- ((word *)result)[lw-2] = 0;
+ ((word *)result)[GRANULES_TO_WORDS(lg)-1] = 0;
+ ((word *)result)[GRANULES_TO_WORDS(lg)-2] = 0;
# endif
}
}
void * GC_generic_malloc_ignore_off_page(size_t lb, int k)
{
void *result;
- size_t lg, lw;
+ size_t lg;
size_t lb_rounded;
word n_blocks;
GC_bool init;
if (SMALL_OBJ(lb))
return(GC_generic_malloc((word)lb, k));
lg = ROUNDED_UP_GRANULES(lb);
- lw = GRANULES_TO_WORDS(lg);
lb_rounded = GRANULES_TO_BYTES(lg);
n_blocks = OBJ_SZ_TO_BLOCKS(lb_rounded);
init = GC_obj_kinds[k].ok_init;
/* before we release the lock. */
((word *)result)[0] = 0;
((word *)result)[1] = 0;
- ((word *)result)[lw-1] = 0;
- ((word *)result)[lw-2] = 0;
+ ((word *)result)[GRANULES_TO_WORDS(lg)-1] = 0;
+ ((word *)result)[GRANULES_TO_WORDS(lg)-2] = 0;
# endif
}
}