Hello,

I observed the following memory usage with bmem by launching the executable 
a.out compiled with this small piece of code (with bigloo 3.5a to 4.3b):

a.out 10000 quote
=> takes few Kbytes

a.out 10000 quasiquote
=> takes ~ 500 Mbytes (!)

So my question: is this memory requirement normal for the quasiquote case?
(if yes and if bigloo cannot be fixed, I will replace quasiquotes by quotes 
when equivalent like in this case before evaluation)

Thanks and Best Regards,
Lionel



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(module a

  (main main))



;; eval wrapper to proove all memory is allocated in the my-eval function with 
bmem

(define (my-eval e)

  (eval e))



(define (main argv)

  (when (< (length argv) 3)

    (fprint (current-error-port) (format "Usage: ~a <n> quote|quasiquote" (car 
argv)))

    (exit 1))

  (let* ((n (string->integer (list-ref argv 1)))

               (q (string->symbol (list-ref argv 2)))

               (e `(,q ,(iota n)))

               (r #unspecified))

    (when (< n 10)

      (write e)

      (newline))

    (set! r (my-eval e))

    (when (< n 10)

      (write r)

      (newline))

    (print (length r))))


Reply via email to