Test program with more features:
sbcl --dynamic-space-size 64 --eval " (progn (locally (declare (optimize (speed 3) (debug 0) (safety 0)) (inline make-array)) (defconstant gc-stats (define-alien-routine "print_generation_stats" void)) (defconstant full-gc-interval most-positive-fixnum) (defconstant array-size 10900) (defun gc-alloc-test () (loop :for i fixnum :upfrom 0 :do (progn '(funcall gc-stats) '(make-array array-size :element-type 'fixnum :initial-element 0) (gc :full (zerop (mod i full-gc-interval))) '(print i))))) (gc-alloc-test)) "
Test program with more features:
sbcl --dynamic- space-size 64 --eval " alien-routine "print_ generation_ stats" void)) fixnum)
' (funcall gc-stats)
' (make-array array-size :element-type 'fixnum :initial-element 0)
' (print i)))))
(progn
(locally (declare (optimize (speed 3) (debug 0) (safety 0)) (inline make-array))
(defconstant gc-stats (define-
(defconstant full-gc-interval most-positive-
(defconstant array-size 10900)
(defun gc-alloc-test ()
(loop :for i fixnum :upfrom 0 :do
(progn
(gc :full (zerop (mod i full-gc-interval)))
(gc-alloc-test))
"