* gc.c (heap_page_resurrect): return a page in tomb heap even if
freelist is NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1058f20672
commit
97f0de6d90
@ -1,3 +1,8 @@
|
|||||||
|
Tue Oct 29 16:24:52 2013 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* gc.c (heap_page_resurrect): return a page in tomb heap even if
|
||||||
|
freelist is NULL.
|
||||||
|
|
||||||
Tue Oct 29 15:46:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Oct 29 15:46:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* ruby_atomic.h (ATOMIC_SIZE_CAS): new macro, compare and swap size_t.
|
* ruby_atomic.h (ATOMIC_SIZE_CAS): new macro, compare and swap size_t.
|
||||||
|
14
gc.c
14
gc.c
@ -936,17 +936,11 @@ heap_page_resurrect(rb_objspace_t *objspace)
|
|||||||
{
|
{
|
||||||
struct heap_page *page;
|
struct heap_page *page;
|
||||||
|
|
||||||
if (heap_tomb->pages) {
|
if ((page = heap_tomb->pages) != NULL) {
|
||||||
page = heap_tomb->pages;
|
heap_unlink_page(objspace, heap_tomb, page);
|
||||||
while (page) {
|
return page;
|
||||||
if (page->freelist) {
|
|
||||||
heap_unlink_page(objspace, heap_tomb, page);
|
|
||||||
return page;
|
|
||||||
}
|
|
||||||
page = page->next;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct heap_page *
|
static struct heap_page *
|
||||||
|
Loading…
x
Reference in New Issue
Block a user