From 0ecc82f6d648e125bb39fdeaa0781d98dd671e0c Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 30 Jun 2016 01:29:02 +0300 Subject: [PATCH] Revert "Fix GC_new_kind in case of client-defined PREDEFINED_KINDS" This reverts commit 0d4d41f1e2b12c1321cb37e2bcbe07c8bb089a2d. --- mark.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/mark.c b/mark.c index 8fd08f70..fb4740a0 100644 --- a/mark.c +++ b/mark.c @@ -71,18 +71,21 @@ GC_INNER struct obj_kind GC_obj_kinds[MAXOBJKINDS] = { # endif }; -#if 0 -# ifdef STUBBORN_ALLOC -# define GC_N_KINDS_INITIAL_VALUE (STUBBORN+1) +# ifdef GC_ATOMIC_UNCOLLECTABLE +# ifdef STUBBORN_ALLOC +# define GC_N_KINDS_INITIAL_VALUE 5 +# else +# define GC_N_KINDS_INITIAL_VALUE 4 +# endif # else -# define GC_N_KINDS_INITIAL_VALUE STUBBORN -# endif -#endif -/* TODO: Add new API function to allocate kinds in range */ -/* GC_N_KINDS_INITIAL_VALUE .. PREDEFINED_KINDS-1 (if any) */ -/* which do not need allocation of a free list. */ +# ifdef STUBBORN_ALLOC +# define GC_N_KINDS_INITIAL_VALUE 4 +# else +# define GC_N_KINDS_INITIAL_VALUE 3 +# endif +# endif /* !GC_ATOMIC_UNCOLLECTABLE */ -GC_INNER unsigned GC_n_kinds = PREDEFINED_KINDS; +GC_INNER unsigned GC_n_kinds = GC_N_KINDS_INITIAL_VALUE; # ifndef INITIAL_MARK_STACK_SIZE # define INITIAL_MARK_STACK_SIZE (1*HBLKSIZE) -- 2.40.0