diff options
Diffstat (limited to 'internal/gc.h')
-rw-r--r-- | internal/gc.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/internal/gc.h b/internal/gc.h index b7b29214cf..baf4f36a10 100644 --- a/internal/gc.h +++ b/internal/gc.h @@ -67,9 +67,19 @@ struct rb_objspace; /* in vm_core.h */ rb_obj_write((VALUE)(a), UNALIGNED_MEMBER_ACCESS((VALUE *)(slot)), \ (VALUE)(b), __FILE__, __LINE__) -typedef struct ractor_newobj_cache { +#if USE_RVARGC +# define SIZE_POOL_COUNT 4 +#else +# define SIZE_POOL_COUNT 1 +#endif + +typedef struct ractor_newobj_size_pool_cache { struct RVALUE *freelist; struct heap_page *using_page; +} rb_ractor_newobj_size_pool_cache_t; + +typedef struct ractor_newobj_cache { + rb_ractor_newobj_size_pool_cache_t size_pool_caches[SIZE_POOL_COUNT]; } rb_ractor_newobj_cache_t; /* gc.c */ |