diff options
Diffstat (limited to 'doc/guides/gc-arena-howto.md')
| -rw-r--r-- | doc/guides/gc-arena-howto.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/guides/gc-arena-howto.md b/doc/guides/gc-arena-howto.md index 7c367c98a..192a10802 100644 --- a/doc/guides/gc-arena-howto.md +++ b/doc/guides/gc-arena-howto.md @@ -11,13 +11,13 @@ execution speed. This is an error indicating overflow of "GC arena" implementing "conservative GC". GC (garbage collector) must ensure that object is "alive", in other -words, that it is referenced by somewhere from program. This can be +words, that it is referenced by somewhere from the program. This can be determined by checking if the object can be directly or indirectly referenced by root. The local variables, global variables and constants etc are root. If program execution is performed inside mruby VM, there is nothing to -worry about because GC can access all roots owned by VM. +worry about because GC can access all roots owned by the VM. The problem arises when executing C functions. The object referenced by C variable is also "alive", but mruby GC cannot aware of this, so @@ -38,7 +38,7 @@ The biggest problem is we have no way to access to the stack area in portable way. Therefore, we cannot use this method if we'd like to implement highly portable runtime, like mruby. -So we came up with an another plan to implement "conservative GC" in mruby. +So we came up with another plan to implement "conservative GC" in mruby. Again, the problem is when an object which was created in C function, becomes no longer referenced in the Ruby world, and cannot be treated as garbage. @@ -161,7 +161,7 @@ Please note that the final `inspect` representation of entire array was created before the call of `mrb_gc_arena_restore()`. Otherwise, required temporal object may be deleted by GC. -We may have a usecase where after creating many temporal objects, we'd +We may have an usecase where after creating many temporal objects, we'd like to keep some of them. In this case, we cannot use the same idea in `ary_inspect()` like appending objects to existing one. Instead, after `mrb_gc_arena_restore()`, we must re-register the objects we |
