Make heap growth more conservative after GC_gcollect_and_unmap call
authorIvan Maidanski <ivmai@mail.ru>
Tue, 17 Dec 2013 06:02:05 +0000 (10:02 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 17 Dec 2013 13:48:03 +0000 (17:48 +0400)
commit09304d190755782866524aa9b6d06ea83f69a023
tree411af9e956f04d1f68376816d322e167332e7f94
parent61a51a087e3716ec3dcbc4b1d3d36a9ad330df75
Make heap growth more conservative after GC_gcollect_and_unmap call
(Consider heap size growth since latest GC_gcollect_and_unmap
invocation instead of absolute heap size value when computing amount
of extra memory blocks to add to heap in GC_collect_or_expand.)

* alloc.c (GC_heapsize_at_forced_unmap): New static variable.
* alloc.c (GC_gcollect_and_unmap): Store current heap size to
GC_heapsize_at_forced_unmap; add comment.
* alloc.c (GC_collect_or_expand): Change blocks_to_get computation
considering heap size growth since latest GC_heapsize_at_forced_unmap
call (instead of the absolute heap size value); do not call
GC_expand_hp_inner twice with same argument.
* include/private/gc_priv.h (_GC_arrays._heapsize): Refine comment.
alloc.c
include/private/gc_priv.h