Commit graph

8 commits

Author SHA1 Message Date
Peter Zhu
d28368d27f Move special constant check in rb_gc_location to gc.c 2024-12-16 13:32:35 -05:00
John Hawthorn
36f49eb2b4 Fix compilation with MALLOC_ALLOCATED_SIZE
Previously compilation failed with -DMALLOC_ALLOCATED_SIZE=1

Co-authored-by: Matthew Draper <matthew@trebex.net>
2024-12-11 16:58:35 -08:00
Nobuyoshi Nakada
f243733564
[Bug #20941] Bail out when recursing no memory 2024-12-11 16:12:04 +09:00
Peter Zhu
eedb30d385 Use rb_gc_enable/rb_gc_disable_no_rest instead of ruby_disable_gc
We should use the rb_gc_enable/rb_gc_disable_no_rest APIs instead of
directly setting the ruby_disable_gc variable.
2024-12-05 16:21:37 -05:00
Peter Zhu
7ccad5b9f8 darray.h does not depend on internal/bits.h
darray.h no longer depends on internal/bits.h, so we can remove it.
2024-12-05 14:12:56 -05:00
Peter Zhu
ce1ad1b816 Standardize on the name "modular GC"
We have name fragmentation for this feature, including "shared GC",
"modular GC", and "external GC". This commit standardizes the feature
name to "modular GC" and the implementation to "GC library".
2024-12-05 10:33:26 -05:00
卜部昌平
25ad7e8e6c rb_gc_impl_malloc can return NULL
Let there be rooms for each GC implementations how to handle multi
threaded situations.  They can be totally reentrant, or can have
their own mutex, or can rely on rb_thread_call_with_gvl.

In any ways the allocator (has been, but now officially is)
expected to run properly without a GVL.  This means there need be
a way for them to inform the interpreter about their allocation
failures, without relying on raising exceptions.

Let them do so by returning NULL.
2024-11-29 23:19:05 +09:00
Matt Valentine-House
d61933e503 Use extconf to build external GC modules
Co-Authored-By: Peter Zhu <peter@peterzhu.ca>
2024-11-25 13:05:23 +00:00