From dce802dd613db17887f5eb990c5aff59980ec838 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 23 May 2018 11:05:29 +0300 Subject: [PATCH] Turn on incremental mode in cordtest cord/de and staticroots test * cord/tests/cordtest.c [!NO_INCREMENTAL] (main): Call GC_enable_incremental() after GC_INIT. * cord/tests/de.c [!NO_INCREMENTAL] (main): Likewise. * cord/tests/de_win.c [!NO_INCREMENTAL] (WinMain): Likewise. * tests/staticrootslib.c [!NO_INCREMENTAL] (main): Likewise. --- cord/tests/cordtest.c | 3 +++ cord/tests/de.c | 3 +++ cord/tests/de_win.c | 3 +++ tests/staticrootslib.c | 3 +++ 4 files changed, 12 insertions(+) diff --git a/cord/tests/cordtest.c b/cord/tests/cordtest.c index 8de6980f..c3ad01f4 100644 --- a/cord/tests/cordtest.c +++ b/cord/tests/cordtest.c @@ -308,6 +308,9 @@ int main(void) printf("cordtest:\n"); # endif GC_INIT(); +# ifndef NO_INCREMENTAL + GC_enable_incremental(); +# endif test_basics(); test_extras(); test_printf(); diff --git a/cord/tests/de.c b/cord/tests/de.c index 321296c5..9d74ae64 100644 --- a/cord/tests/de.c +++ b/cord/tests/de.c @@ -583,6 +583,9 @@ int main(int argc, char **argv) argc = ccommand(&argv); # endif GC_INIT(); +# ifndef NO_INCREMENTAL + GC_enable_incremental(); +# endif if (argc != 2) { fprintf(stderr, "Usage: %s file\n", argv[0]); diff --git a/cord/tests/de_win.c b/cord/tests/de_win.c index 24f0a6e2..2715c413 100644 --- a/cord/tests/de_win.c +++ b/cord/tests/de_win.c @@ -47,6 +47,9 @@ int APIENTRY WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, HACCEL hAccel; GC_INIT(); +# ifndef NO_INCREMENTAL + GC_enable_incremental(); +# endif # if defined(CPPCHECK) GC_noop1((GC_word)&WinMain); # endif diff --git a/tests/staticrootslib.c b/tests/staticrootslib.c index f5725c6e..9ba6d353 100644 --- a/tests/staticrootslib.c +++ b/tests/staticrootslib.c @@ -47,6 +47,9 @@ static struct treenode *root_nz[10] = { (struct treenode *)(GC_word)2 }; { # ifndef STATICROOTSLIB_INIT_IN_MAIN GC_INIT(); +# endif +# ifndef NO_INCREMENTAL + GC_enable_incremental(); # endif return GC_MALLOC(sizeof(struct treenode)); } -- 2.40.0