diff options
author | Peter Zhu <peter@peterzhu.ca> | 2023-03-27 09:40:24 -0400 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2023-03-27 09:40:24 -0400 |
commit | a2ff9423a1ecc4f2831a69f82a60f00c4a3f81a9 (patch) | |
tree | 0ccd398fce4bced138a0ab256b8a540e7cb0f640 | |
parent | 36254c5ddf1b1b16fe5f1705227713ee7529b2f5 (diff) | |
download | ruby-a2ff9423a1ecc4f2831a69f82a60f00c4a3f81a9.tar.gz |
Allow user defined SIZE_POOL_COUNT
We shouldn't overwrite the value of SIZE_POOL_COUNT if the user has
specified one.
-rw-r--r-- | internal/gc.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/internal/gc.h b/internal/gc.h index 0abdb22ffd..2b67ca40dc 100644 --- a/internal/gc.h +++ b/internal/gc.h @@ -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) -# define SIZE_POOL_COUNT 5 -#else -# define SIZE_POOL_COUNT 1 +#ifndef SIZE_POOL_COUNT +# if USE_RVARGC && (SIZEOF_UINT64_T == SIZEOF_VALUE) +# define SIZE_POOL_COUNT 5 +# else +# define SIZE_POOL_COUNT 1 +# endif #endif #define RCLASS_EXT_EMBEDDED (SIZE_POOL_COUNT > 1) |