commit | 805603169183196a09d3fdcbe7a365c8665aa703 | [log] [tgz] |
---|---|---|
author | swissChili <swisschili@fastmail.com> | Sun Jul 31 21:05:47 2022 -0700 |
committer | swissChili <swisschili@fastmail.com> | Sun Jul 31 21:05:47 2022 -0700 |
tree | c53d82ff1b98c68fddb87cd67a91774d6440b1be | |
parent | c0acce457146e0b01b72b3dcead6907a4289df99 [diff] [blame] |
Add GC segments to differentiate C stack space from Lisp
diff --git a/src/lisp/main.c b/src/lisp/main.c index a9231b8..2a37b4c 100644 --- a/src/lisp/main.c +++ b/src/lisp/main.c
@@ -5,6 +5,8 @@ int main(int argc, char **argv) { + gc_push_segment(NULL, 0); + if (argc < 2) { puts("pass the program you want to run as the first argument please"); @@ -25,7 +27,7 @@ if (lisp_main_f) { value_t (*lisp_main)() = lisp_main_f->def0; - gc_set_base_here(); + gc_prepare_call(0); lisp_main(); } else