Allow user defined SIZE_POOL_COUNT

We shouldn't overwrite the value of SIZE_POOL_COUNT if the user has
specified one.
This commit is contained in:
Peter Zhu 2023-03-27 09:40:24 -04:00
parent 36254c5ddf
commit a2ff9423a1

View File

@ -189,10 +189,12 @@ struct rb_objspace; /* in vm_core.h */
// We use SIZE_POOL_COUNT number of shape IDs for transitions out of different size pools
// The next available shape ID will be the SPECIAL_CONST_SHAPE_ID
#if USE_RVARGC && (SIZEOF_UINT64_T == SIZEOF_VALUE)
#ifndef SIZE_POOL_COUNT
# if USE_RVARGC && (SIZEOF_UINT64_T == SIZEOF_VALUE)
# define SIZE_POOL_COUNT 5
#else
# else
# define SIZE_POOL_COUNT 1
# endif
#endif
#define RCLASS_EXT_EMBEDDED (SIZE_POOL_COUNT > 1)