mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* gc.c (heap_page_resurrect): do not return tomb_pages when
page->freelist == NULL. [Bug #12670] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6ed8c79ddb
commit
0b8ab5b0a8
2 changed files with 14 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
Fri Nov 4 17:52:44 2016 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* gc.c (heap_page_resurrect): do not return tomb_pages when
|
||||
page->freelist == NULL.
|
||||
[Bug #12670]
|
||||
|
||||
Fri Nov 4 16:31:45 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* util.c (ruby_dtoa): round to even, instead of rounding to
|
||||
|
|
12
gc.c
12
gc.c
|
@ -1550,12 +1550,16 @@ heap_page_allocate(rb_objspace_t *objspace)
|
|||
static struct heap_page *
|
||||
heap_page_resurrect(rb_objspace_t *objspace)
|
||||
{
|
||||
struct heap_page *page;
|
||||
struct heap_page *page = heap_tomb->pages;
|
||||
|
||||
if ((page = heap_tomb->pages) != NULL) {
|
||||
heap_unlink_page(objspace, heap_tomb, page);
|
||||
return page;
|
||||
while (page) {
|
||||
if (page->freelist != NULL) {
|
||||
heap_unlink_page(objspace, heap_tomb, page);
|
||||
return page;
|
||||
}
|
||||
page = page->next;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue