-
I am trying to understand how the GC works in more detail, since I want to make sure the lifetime of objects shared between Ruby and C works as I expect. Is this roughly correct;
Regarding the Arena, would it have been possible to instead just turn off GC when inside C functions, and turn it back on when returning? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Your basic understanding of GC is correct, except that does not cover the generational and incremental aspects of the garbage collector. Maybe And the answer to your question would be "yes, but it may be hard to detect allocating too many objects". |
Beta Was this translation helpful? Give feedback.
Your basic understanding of GC is correct, except that does not cover the generational and incremental aspects of the garbage collector.
Maybe
doc/guides/gc-arena-howto.md
would help you to understand the arena better.And the answer to your question would be "yes, but it may be hard to detect allocating too many objects".