From c240328b98730ce1e087e16107279cb6c1020fed Mon Sep 17 00:00:00 2001 From: Jamie Cho Date: Sun, 4 Jun 2017 10:37:44 -0400 Subject: [PATCH] Work around stack overflow problem --- cfgs/rgb/default.cfg | 10 +--------- minilisp.c | 3 ++- nqueens.lsp | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/cfgs/rgb/default.cfg b/cfgs/rgb/default.cfg index 0572e93..02f0986 100644 --- a/cfgs/rgb/default.cfg +++ b/cfgs/rgb/default.cfg @@ -1,13 +1,5 @@  - - - - - KEYCODE_F1 - - - - + diff --git a/minilisp.c b/minilisp.c index b6fe3aa..8f54c97 100644 --- a/minilisp.c +++ b/minilisp.c @@ -378,8 +378,9 @@ static void gc(void *root) { // Finish up GC. size_t old_nused = mem_nused; mem_nused = (size_t)((uint8_t *)scan1 - (uint8_t *)memory); + byte sp; if (debug_gc) - fprintf(stderr, "GC: %x/%x\n", mem_nused, old_nused); + fprintf(stderr, "GC: %x/%x SP: %x\n", mem_nused, old_nused, &sp); gc_running = false; } diff --git a/nqueens.lsp b/nqueens.lsp index fee713f..8fb4cb8 100644 --- a/nqueens.lsp +++ b/nqueens.lsp @@ -197,6 +197,6 @@ ;;; MAIN ;;; -(DEFINE BOARD-SIZE 4) +(DEFINE BOARD-SIZE 3) (DEFINE BOARD (MAKE-BOARD BOARD-SIZE)) (SOLVE BOARD)