Skip to content

Commit

Permalink
* gc.c (gc_lazy_sweep): if sweep target slots are not found, we
Browse files Browse the repository at this point in the history
  try heap_increment() because it might be able to expand the
  heap. [Bug ruby#5127] [ruby-dev:44285]

* gc.c (gc_clear_mark_on_sweep_slots): if a sweeping was
  interrupted, we expand the heap if at all possible.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
authorNari committed Aug 9, 2011
1 parent 75a8409 commit e26cead
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
@@ -1,3 +1,12 @@
Tue Aug 9 11:21:08 2011 Narihiro Nakamura <authornari@gmail.com>

* gc.c (gc_lazy_sweep): if sweep target slots are not found, we
try heap_increment() because it might be able to expand the
heap. [Bug #5127] [ruby-dev:44285]

* gc.c (gc_clear_mark_on_sweep_slots): if a sweeping was
interrupted, we expand the heap if at all possible.

Tue Aug 9 12:20:33 2011 Naohisa Goto <ngotogenome@gmail.com>

* test/fiddle/helper.rb (libc_so, libm_so): Solaris support added.
Expand Down
7 changes: 7 additions & 0 deletions gc.c
Expand Up @@ -2172,6 +2172,12 @@ gc_lazy_sweep(rb_objspace_t *objspace)
}
after_gc_sweep(objspace);
}
else {
if (heaps_increment(objspace)) {
during_gc = 0;
return TRUE;
}
}

gc_marks(objspace);

Expand Down Expand Up @@ -2417,6 +2423,7 @@ gc_clear_mark_on_sweep_slots(rb_objspace_t *objspace)
RVALUE *p, *pend;

if (objspace->heap.sweep_slots) {
while (heaps_increment(objspace));
while (objspace->heap.sweep_slots) {
scan = objspace->heap.sweep_slots;
p = scan->slot; pend = p + scan->limit;
Expand Down

0 comments on commit e26cead

Please sign in to comment.