diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-08-20 13:57:18 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-08-20 13:57:18 -0700 |
| commit | 836a5ea3032b4dbb62626eb93d46da60082c3739 (patch) | |
| tree | 85114358bbd02c895f2b781f0e8af24c3cb1cc57 /src/gc.c | |
| parent | ed9f18520dcaacb571a72653b46a11be897a7ee4 (diff) | |
| parent | a851bcd631e9a8953f29b4f63ad0354ee775e02e (diff) | |
| download | mruby-836a5ea3032b4dbb62626eb93d46da60082c3739.tar.gz mruby-836a5ea3032b4dbb62626eb93d46da60082c3739.zip | |
Merge pull request #437 from masamitsu-murase/modify_irep_initialization_and_gc_mark
Modify irep initialization and GC.
Diffstat (limited to 'src/gc.c')
| -rw-r--r-- | src/gc.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -587,8 +587,10 @@ root_scan_phase(mrb_state *mrb) mrb_gc_mark(mrb, (struct RBasic*)ci->target_class); } /* mark irep pool */ - for (i=0; i<mrb->irep_len; i++) { - if (mrb->irep) { + if (mrb->irep) { + size_t len = mrb->irep_len; + if (len > mrb->irep_capa) len = mrb->irep_capa; + for (i=0; i<len; i++) { mrb_irep *irep = mrb->irep[i]; if (!irep) continue; for (j=0; j<irep->plen; j++) { |
