]> granicus.if.org Git - gc/commit
Avoid unexpected heap growth in gctest caused by GC_disable
authorIvan Maidanski <ivmai@mail.ru>
Fri, 15 Feb 2019 20:40:49 +0000 (23:40 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 15 Feb 2019 20:49:12 +0000 (23:49 +0300)
commit4e79c357e853ca8e9ed0df7369f036b0d81326cf
tree16c344a7acd6123695e42f194cfa23c565b90013
parent88664f9b753570d0140162cfbdc4e3750b507e67
Avoid unexpected heap growth in gctest caused by GC_disable
(fix of commit 8fc1ebf6d)

Issue #264 (bdwgc).

This commit eliminates the scenario when one thread disables garbage
collections while other threads intensively allocate memory objects.

* tests/test.c (run_one_test): Do not call GC_disable and GC_enable.
* tests/test.c (run_single_threaded_test): New function (which tests
GC_disable and GC_enable).
* tests/test.c (main): Call run_single_threaded_test() (before
check_heap_stats).
tests/test.c