arcadia
arcadia copied to clipboard
realloc going wild in stack_add function
Hi Kim, I am trying to figure out what is happening, maybe you can give me some directions on how to understand what's going on.. consider this:
echo '((fn (x) (x x)) (fn (x) (x x)))' | ./arcadia
This simple example makes arcadia allocates memory as if there is no end of it, from what I understand the code above should produce an "infinite stream of cons" and run in linear space, my main worry is that this is happening because some design decision that cannot be easily solved. Insights?
The allocation goes berserk in a realloc
in stack_add
function, the real cause is unclear to me.