Careful debugging of the memory leak problem. At this stage,

stack frames for interpreted (but not primitive) functions appear not to be being
reclaimed, and the oblist doesn't seem to be being fully reclaimed.
This commit is contained in:
Simon Brooke 2026-02-20 19:39:19 +00:00
parent 8629e33f92
commit 70376c6529
14 changed files with 156 additions and 50 deletions

View file

@ -1,9 +1,9 @@
(set! symbolp (lambda (x) (equal (type x) "SYMB")))
(set! symbol? (lambda (x) (equal (type x) "SYMB")))
(set! defun!
(nlambda
form
(cond ((symbolp (car form))
(cond ((symbol? (car form))
(set (car form) (apply 'lambda (cdr form))))
(t nil))))
@ -17,7 +17,7 @@
(set! defsp!
(nlambda
form
(cond (symbolp (car form))
(cond (symbol? (car form))
(set! (car form) (apply nlambda (cdr form))))))
(defsp! cube (x) ((* x x x)))

View file

@ -4,6 +4,6 @@
(cond ((= n 1) 1)
(t (* n (fact (- n 1)))))))
; (fact 1000)
(fact 25)