summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-06-11 06:30:01 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-06-11 06:30:01 +0000
commitbe83b8be34318b74544d435305cb98689eae8089 (patch)
treee83027e2d8b4a3ab3435eaf9eb345ced538d3ca8 /gc.c
parentecfa8525662a6c9d0570c2ac53cfbeb809a62e8f (diff)
990611
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gc.c b/gc.c
index db7392d..656d505 100644
--- a/gc.c
+++ b/gc.c
@@ -298,7 +298,7 @@ rb_data_object_alloc(klass, datap, dmark, dfree)
}
extern st_table *rb_class_tbl;
-VALUE *rb_gc_stack_start;
+VALUE *rb_gc_stack_start = 0;
#if defined(__GNUC__) && __GNUC__ >= 2
__inline__
@@ -950,22 +950,26 @@ gc_start()
}
void
-Init_stack()
+Init_stack(addr)
+ VALUE *addr;
{
#ifdef __human68k__
extern void *_SEND;
- gc_stack_start = _SEND;
+ rb_gc_stack_start = _SEND;
#else
VALUE start;
- rb_gc_stack_start = &start;
+ if (!addr) addr = &start;
+ rb_gc_stack_start = addr;
#endif
}
void
Init_heap()
{
- Init_stack();
+ if (!rb_gc_stack_start) {
+ Init_stack(0);
+ }
add_heap();
}