2009-09-19 Ivan Maidanski <ivmai@mail.ru>
authorivmai <ivmai>
Sat, 19 Sep 2009 09:19:24 +0000 (09:19 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:47 +0000 (21:06 +0400)
commite3bb4782167e908af00a7c963373f4d2304fbe33
tree18663d31995f4fe0abf5e0185ebea4533ff113ee
parent99732472f663cd6c3a63be3f20ec033fd40465e9
2009-09-19  Ivan Maidanski <ivmai@mail.ru>
(ivmai129.diff - superseding diff47)

* alloc.c (GC_default_stop_func): New static variable (initialized
to GC_never_stop_func).
* alloc.c (GC_set_stop_func, GC_get_stop_func): New function.
* alloc.c (GC_timeout_stop_func): Define as GC_default_stop_func
(instead of GC_never_stop_func) if SMALL_CONFIG (or NO_CLOCK),
else call GC_default_stop_func() before getting "current_time".
* alloc.c (GC_maybe_gc): Expand GC_gcollect_inner() macro (for
FIXME comment).
* alloc.c (GC_maybe_gc, GC_collect_a_little_inner): add FIXME for
replacing GC_never_stop_func with GC_default_stop_func (if
possible).
* alloc.c (GC_gcollect): Use GC_default_stop_func.
* alloc.c (GC_collect_or_expand): Use GC_default_stop_func
(instead of GC_never_stop_func) unless it is trigged due to out of
memory; don't increment GC_fail_count and don't output warning
(before trying to collect again) in case the collection has been
interrupted (by GC_default_stop_func) and the heap expansion has
failed too.
* include/gc.h (GC_set_stop_func, GC_get_stop_func): New function
prototypes.
ChangeLog
alloc.c
include/gc.h