From: Ivan Maidanski Date: Tue, 31 Jan 2012 04:22:16 +0000 (+0400) Subject: Adjust GC_requested_heapsize on GC_init if GC_INITIAL_HEAP_SIZE given X-Git-Tag: gc7_3alpha2~155 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=002f22797140b3fde3325d94a4aa758039ae654a;p=platform%2Fupstream%2Flibgc.git Adjust GC_requested_heapsize on GC_init if GC_INITIAL_HEAP_SIZE given * misc.c (GC_init): Adjust GC_requested_heapsize if GC_expand_hp_inner (called with the value passed by "GC_INITIAL_HEAP_SIZE" environment variable) succeeded. --- diff --git a/misc.c b/misc.c index 63545d4..0301195 100644 --- a/misc.c +++ b/misc.c @@ -1000,6 +1000,8 @@ GC_API void GC_CALL GC_init(void) if (!GC_expand_hp_inner(initial_heap_sz)) { GC_err_printf("Can't start up: not enough memory\n"); EXIT(); + } else { + GC_requested_heapsize += initial_heap_sz; } if (GC_all_interior_pointers) GC_initialize_offsets();