зеркало из https://github.com/github/ruby.git
* gc.c (gc_before_heap_sweep): fix freelist management.
After rb_gc_force_recycle() for a object blonging to heap->freelist, `heap->using_page->freelist' is not null. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a2231670d6
Коммит
98feb2b9bf
|
@ -1,3 +1,9 @@
|
|||
Sat Oct 26 04:01:35 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* gc.c (gc_before_heap_sweep): fix freelist management.
|
||||
After rb_gc_force_recycle() for a object blonging to heap->freelist,
|
||||
`heap->using_page->freelist' is not null.
|
||||
|
||||
Thu Oct 24 21:57:24 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
|
||||
|
||||
* parse.y: Remove +(binary) and -(binary) special cases
|
||||
|
|
13
gc.c
13
gc.c
|
@ -2483,7 +2483,18 @@ gc_before_heap_sweep(rb_objspace_t *objspace, rb_heap_t *heap)
|
|||
heap->free_pages = NULL;
|
||||
|
||||
if (heap->using_page) {
|
||||
heap->using_page->freelist = heap->freelist;
|
||||
if (heap->using_page->freelist) {
|
||||
RVALUE *pstart = heap->using_page->freelist;
|
||||
RVALUE *p = heap->using_page->freelist;
|
||||
while (p->as.free.next) {
|
||||
p = p->as.free.next;
|
||||
}
|
||||
p->as.free.next = heap->freelist;
|
||||
heap->using_page->freelist = pstart;
|
||||
}
|
||||
else {
|
||||
heap->using_page->freelist = heap->freelist;
|
||||
}
|
||||
heap->using_page = NULL;
|
||||
}
|
||||
heap->freelist = NULL;
|
||||
|
|
Загрузка…
Ссылка в новой задаче