possible bug in miniPicoLisp?

2023-11-28 Thread C K Kashyap
Hi Alex, I attempted to use 1 as the CELLS value in pico.h and immediately ran into segfault at mark(ApplyArgs); in gc.c. I got around the segfault by simply doing this - if(ApplyArgs)mark(ApplyArgs); if(ApplyBody)mark(ApplyBody); After that, most things work but I ran into another segfault

Re: possible bug in miniPicoLisp?

2023-11-28 Thread Alexander Burger
Hi Kashyap, > I attempted to use 1 as the CELLS value in pico.h and immediately ran into > segfault Yes, this is not a good idea ;) CELLS is the number of cells per heap typedef struct heap { cell cells[CELLS]; struct heap *next; } heap; and PicoLisp allocates as many heaps a