Code refactoring of huge_test
authorIvan Maidanski <ivmai@mail.ru>
Tue, 27 Sep 2016 07:47:00 +0000 (10:47 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 27 Sep 2016 07:47:00 +0000 (10:47 +0300)
commitbcfcf4a9ccd9ef6f21fab5f2cb9cb05bc1afdb19
treea05c80c00af408c37002d9fab35597f3be7d6c63
parent552ad0834672fed86ada6430150ef9ebdd3f54d7
Code refactoring of huge_test

* tests/huge_test.c [!GC_MAXIMUM_HEAP_SIZE] (GC_MAXIMUM_HEAP_SIZE,
GC_INITIAL_HEAP_SIZE): Define (before include gc.h); move the comment
from main().
* tests/huge_test.c (CHECK_ALLOC_FAILED): New macro.
* tests/huge_test.c (main): Remove "r" local variable; do not call
GC_set_max_heap_size and GC_expand_hp explicitly (as it is done
by GC_INIT provided GC_MAXIMUM_HEAP_SIZE and GC_INITIAL_HEAP_SIZE are
defined); use CHECK_ALLOC_FAILED (instead of if/fprintf/exit).
tests/huge_test.c