diff options
author | hboehm <hboehm> | 2008-10-28 00:42:29 +0000 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2011-07-26 21:06:43 +0400 |
commit | e637f6ab757ec031eefc2e07af254a4198f5da7a (patch) | |
tree | 8b2fbc85eace0cb5239843b2f8de1ab29c224515 /mallocx.c | |
parent | d60024dba01d3a856a4cd7d99f34b7ee52f5318a (diff) | |
download | bdwgc-e637f6ab757ec031eefc2e07af254a4198f5da7a.tar.gz |
2008-10-27 Hans Boehm <Hans.Boehm@hp.com>
* win32_threads.c (GC_get_stack_min, GC_may_be_in_stack):
Add one entry VirtualQuery cache, I_HOLD_LOCK assertions.
(GC_push_stack_for, GC_get_next_stack) : Hopefully fix WINCE support.
2008-10-27 Hans Boehm <Hans.Boehm@hp.com> (Thanks to Klaus Treichel.)
* finalize.c (GC_general_register_disappearing_link): Add
assertion.
* malloc.c (GC_generic_malloc): Round lb to granules, not words.
* mallocx.c (GC_generic_malloc_ignore_off_page): Round lb to
granules, not words.
Diffstat (limited to 'mallocx.c')
-rw-r--r-- | mallocx.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -167,7 +167,7 @@ void * realloc(void * p, size_t lb) void * GC_generic_malloc_ignore_off_page(size_t lb, int k) { void *result; - size_t lw; + size_t lg, lw; size_t lb_rounded; word n_blocks; GC_bool init; @@ -175,8 +175,9 @@ void * GC_generic_malloc_ignore_off_page(size_t lb, int k) if (SMALL_OBJ(lb)) return(GC_generic_malloc((word)lb, k)); - lw = ROUNDED_UP_WORDS(lb); - lb_rounded = WORDS_TO_BYTES(lw); + 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; if (GC_have_errors) GC_print_all_errors(); |