blob: 88a4126385d767eecf8f84fd2418e6ea93f8a776 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
;; simple slab allocator. Intended only to carve out isolated memory for
;; different threads/routines as they request.
(= Allocator_start 1000) ; lower locations reserved
(enq (fn ()
(run `(((Root_allocator_pointer location) <- literal ,Allocator_start))))
initialization-fns*)
(init-fn new
((2 integer-address) <- copy (Root_allocator_pointer integer))
((3 integer) <- literal 1)
((Root_allocator_pointer integer) <- add (Root_allocator_pointer integer) (3 integer))
(reply (2 integer-address)))
|