blob: af4795fc5bd35a43bcece4cf465d12e4c1ce6540 [file] [log] [blame]
swissChili80560312022-07-31 21:05:47 -07001(defun test-gc-eval ()
2 (eval '(progn
3 (list "hello" "world")
4 (gc))))
5
swissChilia890aed2022-07-30 17:13:07 -07006(defun main ()
7 ;; Allocate some garbage
8 (let1 (used "this should NOT be freed")
9 (list 1 2 3 4)
10 (list "this" "is" "a" "list")
11 (gc)
12 (print (list "Current allocations" "GC runs"))
swissChili80560312022-07-31 21:05:47 -070013 (print (gc-stats)))
14 (print "testing gc in eval")
15 (test-gc-eval))
swissChilia890aed2022-07-30 17:13:07 -070016
17;; Note: This should print that it is freeing both lists, but not the
18;; string