~ chicken-core (chicken-5) /tests/heap-literal-stress-test.scm
Trap1;; This allocates several large objects directly in the heap via the2;; toplevel entry point, for a total of about 10MB on 64-bit machines.3;; This guards against regressions in heap reallocation (#1221).45(define-syntax generate-literals6 (ir-macro-transformer7 (lambda (i r c)8 (let lp ((i 0)9 (exprs '()))10 (if (= i 1000)11 (cons 'begin exprs)12 (lp (add1 i)13 (cons `(define ,(gensym)14 (quote ,(make-vector 1000))) exprs)))))))1516(generate-literals)