aboutsummaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index a1106abcc4..928c312bea 100644
--- a/gc.c
+++ b/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;