Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Try to implement a no-op GC for Ruby.
For the epsilon GC, compile with:
clang -I../include -I. -I../ -I.ext/include/arm64-darwin23 -I/opt/rubies/3.4.0-preview2/include/ruby-3.4.0+0/arm64-darwin23 -Wall -undefined dynamic_lookup -g -O0 -dynamiclib -o gc/librubygc.epsilon.dylib ../gc/epsilon.c
Then configure your ruby to use the shared gc (in your build folder):
mkdir gc
../configure cflags="-fno-omit-frame-pointer" --prefix=$(pwd)/target --disable-install-doc optflags=-O0 --with-opt-dir=$(brew --prefix gmp):$(brew --prefix jemalloc):$(brew --prefix llvm) --wi th-shared-gc=$(pwd)/gc
Then run Ruby with the epsilon GC loaded:
RUBY_GC_LIBRARY=epsilon ./ruby -v test.rb
The version should indicate the GC being used:
ruby 3.4.0dev (2024-12-13T15:23:13Z epsilon-gc ca6664a3eb) +PRISM +GC[epsilon] [arm64-darwin24]