# [Bug #1310] HEAP_SIZE \$B\$GIT6q9g!)(B

e\$B%A%1%C%He(B #1310 e\$B\$,99?7\$5\$l\$^\$7\$?!#e(B (by Narihiro N.)

narie\$B\$G\$9!%e(B

e\$B\$I\$&\$d\$ie(B HEAP_SIZE e\$B\$,Bg\$-\$9\$.\$k\$H!\$DI2C\$9\$ke(B heap_slot
e\$B?t\$N7W;;\$,\$*\$+\$7\$/\$J\$k\$h\$&\$G\$9!%e(B

e\$B0J2<[email protected]\$9\$k\$HD>\$j\$^\$7\$?!%e(B

e\$B59\$7\$1\$l\$P%3%_%C%H\$7\$?\$\$\$N\$G\$9\$,\$\$\$+\$,\$G\$7\$g\$&\$+!%e(B

diff --git a/gc.c b/gc.c
index 835ef5d…8280ec1 100644
— a/gc.c
+++ b/gc.c
@@ -922,6 +922,9 @@ init_heap(rb_objspace_t *objspace)

`````` add = HEAP_MIN_SLOTS / HEAP_OBJ_LIMIT;
``````

• ``````   add = 1;
``````
• if ((heaps_used + add) > heaps_length) {
}
@@ -938,6 +941,10 @@ static void
set_heaps_increment(rb_objspace_t *objspace)
{
size_t next_heaps_length = (size_t)(heaps_used * 1.8);

• if (next_heaps_length == heaps_used)

• ``````   next_heaps_length++;
``````
• heaps_inc = next_heaps_length - heaps_used;

if (next_heaps_length > heaps_length) {

Narihiro Nakmaura

http://redmine.ruby-lang.org/issues/show/1310

[email protected]\$G\$9!#e(B

At Sun, 22 Mar 2009 22:48:24 +0900,
Narihiro N. wrote in [ruby-dev:38185]:

@@ -922,6 +922,9 @@ init_heap(rb_objspace_t *objspace)

`````` add = HEAP_MIN_SLOTS / HEAP_OBJ_LIMIT;
``````
• ``````   add = 1;
``````

nari e\$B\$G\$9!%e(B

e\$B\$&\$%!\$<:Ni\$7\$^\$7\$?!%!%e(B
e\$B\$4;XE&\$"\$j\$,\$H\$&\$4\$6\$\$\$^\$9!%e(B

diff --git a/gc.c b/gc.c
index 835ef5d…829fa7f 100644
— a/gc.c
+++ b/gc.c
@@ -922,6 +922,9 @@ init_heap(rb_objspace_t *objspace)

`````` add = HEAP_MIN_SLOTS / HEAP_OBJ_LIMIT;
``````

• ``````   add = 1;
``````
• if ((heaps_used + add) > heaps_length) {
}
@@ -938,6 +941,10 @@ static void
set_heaps_increment(rb_objspace_t *objspace)
{
size_t next_heaps_length = (size_t)(heaps_used * 1.8);

• if (next_heaps_length == heaps_used)

• ``````   next_heaps_length++;
``````
• heaps_inc = next_heaps_length - heaps_used;

if (next_heaps_length > heaps_length) {

2009/03/23 6:52 Nobuyoshi N. [email protected]:

e\$B\$^\$D\$b\$He(B e\$B\$f\$-\$R\$m\$G\$9e(B

In message “Re: [ruby-dev:38187] Re: [Bug #1310] HEAP_SIZE
e\$B\$GIT6q9g!)e(B”
on Mon, 23 Mar 2009 07:15:37 +0900, Narihiro N.
[email protected] writes:

|e\$B\$4;XE&\$"\$j\$,\$H\$&\$4\$6\$\$\$^\$9!%e(B
|
|diff --git a/gc.c b/gc.c
|index 835ef5d…829fa7f 100644

e\$B\$A\$c\$s\$HF0\$+\$7\$FLdBj\$,=P\$J\$\$\$h\$&\$J\$i%3%_%C%H\$7\$F\$/[email protected]\$5\$\$!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.