From 613455f6f81e67ce2e704a3fd022cad920b5c1d7 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 29 Dec 2014 09:15:42 -0800 Subject: 459 - stop recycling memory between routines I forgot that we have a test with multiple calls to 'run' without intervening 'reset'. --- mu.arc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mu.arc b/mu.arc index 1c756803..7265f363 100644 --- a/mu.arc +++ b/mu.arc @@ -146,10 +146,15 @@ ;; managing concurrent routines +(on-init + (= Memory-allocated-until 1000)) + ; routine = runtime state for a serial thread of execution (def make-routine (fn-name . args) - (annotate 'routine (obj alloc 1000 call-stack (list - (obj fn-name fn-name pc 0 args args caller-arg-idx 0))))) + (do1 + (annotate 'routine (obj alloc Memory-allocated-until call-stack (list + (obj fn-name fn-name pc 0 args args caller-arg-idx 0)))) + (++ Memory-allocated-until 1000))) (defextend empty (x) (isa x 'routine) (no rep.x!call-stack)) -- cgit 1.4.1-2-gfad0