diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-07-23 05:46:17 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-07-23 05:46:17 -0700 |
| commit | be419485ba048c1545fdbc10f75aaf3a0a8f082c (patch) | |
| tree | 2309fa621e47aab02110cdc7b0b828098cf7fd0a /src/gc.c | |
| parent | 0591413ebdc871af8b2a0eace329cc8baade8f7d (diff) | |
| parent | 9bce2eb8b399a27ffdd0073606ca3cb14268348f (diff) | |
| download | mruby-be419485ba048c1545fdbc10f75aaf3a0a8f082c.tar.gz mruby-be419485ba048c1545fdbc10f75aaf3a0a8f082c.zip | |
Merge pull request #1403 from Fleurer/comments-generational-gc
add comments for Generational Mode in gc.c
Diffstat (limited to 'src/gc.c')
| -rw-r--r-- | src/gc.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -66,7 +66,7 @@ For details, see the comments for each function. - = Write Barrier + == Write Barrier mruby implementer, C extension library writer must write a write barrier when writing a pointer to an object on object's field. @@ -75,6 +75,20 @@ * mrb_field_write_barrier * mrb_write_barrier + == Generational Mode + + mruby's GC offers an Generational Mode while re-using the tri-color GC + infrastructure. It will treat the Black objects as Old objects after each + sweep phase, instead of paint them to White. The key idea are still same as + the traditional generational GC: + + * Minor GC - just traverse the Young objects (Gray objects) in the mark + phase, then only sweep the newly created objects, and leave + the Old objects live. + + * Major GC - same as a full round of regular GC. + + For details, see the comments for each function. */ |
