summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-29 07:25:45 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-29 07:25:45 +0000
commit97f0de6d90d9e804386f708172b5a75c277cb38c (patch)
tree972def818f5c8bc2335848f5ad9e8edff67574fc /gc.c
parent1058f206727c23693a2f41b9da5f0cbb76da63f0 (diff)
* 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
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/gc.c b/gc.c
index a570ae3810..f3f6d62c4b 100644
--- a/gc.c
+++ b/gc.c
@@ -936,17 +936,11 @@ heap_page_resurrect(rb_objspace_t *objspace)
{
struct heap_page *page;
- if (heap_tomb->pages) {
- page = heap_tomb->pages;
- while (page) {
- if (page->freelist) {
- heap_unlink_page(objspace, heap_tomb, page);
- return page;
- }
- page = page->next;
- }
+ if ((page = heap_tomb->pages) != NULL) {
+ heap_unlink_page(objspace, heap_tomb, page);
+ return page;
}
- return 0;
+ return NULL;
}
static struct heap_page *