[ create a new paste ] login | about

Link: http://codepad.org/LtytNnbG    [ raw code | fork ]

Plain Text, pasted on Jun 23:
;;; With 4 GB of heap on MacOS with recent SBCL (1.4.7), this dies at
;;; at between the 3rd and 8th iteration.

(defparameter *limit* 4000000)

(defun alloc-small-data () (make-array 32))

(defun f ()
  (loop :with table := (make-array *limit*)
        :for i :below  *limit*
        :do (setf (aref table i) (alloc-small-data))
        :finally (return
                   (progn
                     #+FIX-2
                     (fill table nil)
                     (length table)))))

(defun blow ()
  (loop :for i :from 1 :do
    ;; UNCOMMENT THIS TO "FIX" THE BUG
    #+FIX-1 (sb-ext:gc :full t)
    (f)
    (format t "Iteration #~D *************************************************************:"
            i)
    (room)
    (terpri)))



Create a new paste based on this one


Comments: