bug-kawa
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-kawa] [bug #36917] Memory leak


From: Helmut Eller
Subject: [Bug-kawa] [bug #36917] Memory leak
Date: Sun, 22 Jul 2012 15:18:36 +0000
User-agent: Opera/9.80 (X11; Linux i686; U; en) Presto/2.10.289 Version/12.00

URL:
  <http://savannah.gnu.org/bugs/?36917>

                 Summary: Memory leak
                 Project: Kawa
            Submitted by: ellerh
            Submitted on: Sun 22 Jul 2012 03:18:35 PM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Memory leak in compiler

This loop:

(let ((lambda '(lambda (x) 
                 (+ x 42))))
  (let loop ((i 0))
    (when (= (mod i 1000) 0)
      (format #t "~d: ~:d\n" i ((java.lang.Runtime:getRuntime):totalMemory))
      (force-output))
    (eval lambda)
    (loop (+ i 1))))


eats up all memory quite quickly:

0: 16,056,320
1000: 16,056,320
2000: 27,131,904
3000: 45,506,560
4000: 45,506,560
5000: 80,912,384
6000: 113,627,136
7000: 143,405,056
8000: 143,405,056
9000: 172,199,936
10000: 200,802,304
11000: 200,802,304
12000: 229,109,760
13000: 257,490,944
14000: 257,490,944
15000: 257,490,944


If lambda is replaced with something like

'(lambda ()
   (lambda ()
     (lambda ()
       (lambda ()
         (lambda ()
           42)))))


the needed memory grows much slower:


0: 16,056,320
1000: 16,056,320
2000: 16,121,856
3000: 16,121,856
4000: 16,121,856
5000: 16,121,856
6000: 16,121,856
7000: 16,121,856
8000: 16,121,856
9000: 16,121,856
10000: 16,121,856
11000: 16,121,856
12000: 16,121,856
13000: 16,121,856
14000: 16,121,856
15000: 16,121,856






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?36917>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]