From e63534dd853821e3e4fa36642eed8a25149497ba Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 23 Aug 2014 10:22:57 -0700 Subject: 74 --- sys.arc | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/sys.arc b/sys.arc index d78ea925..7364bfa9 100644 --- a/sys.arc +++ b/sys.arc @@ -1,33 +1,14 @@ (load "mu.arc") -; memory map: 0-2 for convenience numbers -; for these, address == value always; never modify them -(= Zero 0) -(= One 1) -(= Two 2) - -(enq (fn () - (run `(((,Zero integer) <- literal 0) - ((,One integer) <- literal 1) - ((,Two integer) <- literal 2)))) - initialization-fns*) - -; high-water mark for global memory used so far -; just on host, not in simulated memory -(= Memory-used-until 3) -(def static-new (n) - (inc Memory-used-until n)) - -; copy types* info into simulated machine -(= Type-table Memory-used-until) +; memory map: 0-2 for convenience constants (enq (fn () - (each (type typeinfo) types* - (prn type " " typeinfo))) + (run `(((0 integer) <- literal 0) + ((1 integer) <- literal 1) + ((2 integer) <- literal 2)))) initialization-fns*) -(reset) - -(init-fn sizeof) ; todo +; todo: copy types* info into simulated machine +; todo: sizeof ;; 'new' - simple slab allocator. Intended only to carve out isolated memory ;; for different threads/routines as they request. -- cgit 1.4.1-2-gfad0