mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* gc.c (add_heap): fix previous change. [ruby-dev:33988]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fd847f79a0
commit
8e1d6b214a
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Mar 4 13:41:46 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* gc.c (add_heap): fix previous change. [ruby-dev:33988]
|
||||
|
||||
Tue Mar 4 10:21:03 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* gc.c (add_heap): use binary search to find the place to insert the
|
||||
|
|
5
gc.c
5
gc.c
|
@ -466,14 +466,15 @@ add_heap(void)
|
|||
}
|
||||
}
|
||||
|
||||
membase = p;
|
||||
if ((VALUE)p % sizeof(RVALUE) == 0)
|
||||
heap_slots += 1;
|
||||
else
|
||||
p = (RVALUE*)((VALUE)p + sizeof(RVALUE) - ((VALUE)p % sizeof(RVALUE)));
|
||||
if (hi < heaps_used) {
|
||||
MEMMOVE(&heaps[hi+1], &heaps[hi], VALUE, heaps_used - hi);
|
||||
MEMMOVE(&heaps[hi+1], &heaps[hi], struct heaps_slot, heaps_used - hi);
|
||||
}
|
||||
heaps[hi].membase = p;
|
||||
heaps[hi].membase = membase;
|
||||
heaps[hi].slot = p;
|
||||
heaps[hi].limit = heap_slots;
|
||||
pend = p + heap_slots;
|
||||
|
|
Loading…
Add table
Reference in a new issue