[racket-dev] memory issues

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Mon Apr 23 08:12:48 EDT 2012

On Sun, Apr 22, 2012 at 7:32 AM, Stephen Bloch <bloch at adelphi.edu> wrote:
> For example, I start DrRacket from the command line: the window opens, then spends 15 seconds gc-ing before showing the "Welcome" message.  Memory usage 162.50 MB.
> Open ".../collects/picturing-programs/tests/rotating-triangle.rkt"; no problem.
> Close it (don't even run it) and open it again.  A few seconds of gc; memory usage is now 284.77 MB.
> Close it (don't even run it) and open it again.  10 seconds of gc; memory usage is now 314.92 MB.
> Close it (don't even run it) and open it again.  13 seconds of gc; memory usage is now 517.98 MB.
> Close it (don't even run it) and open it again.  15 seconds of gc; memory usage is now 489.95 MB.
> Close it (don't even run it) and open it again.  15 seconds of gc; memory usage is now 708.88 MB.
> Close it (don't even run it) and open it again.  12 seconds of gc; memory usage is now 595.05 MB.
> Close it (don't even run it) and open it again.  32 seconds of gc; memory usage is now 816.63 MB.

I'm not seeing any bad behavior, trying on both the mac and under
windows. Specifically, I started up a fresh DrRacket, passing
rotating-triangle.rkt on the command-line. I then clicked the "gc"
button in the corner until the number stabilized, created a new tab,
closed rotating-triangle.rkt, and then re-opened it, and repeated the
process several times. I didn't see any growth. I also added something
like this to one of DrRacket's memory tests (it was already doing
something similar; I just added opening a file, but I added a much
bigger file, just in case), and the test is passing (it uses weak
boxes to ensure that certain objects are gc'able).

How did you measure the number of seconds and the number of megabytes?

Robby


Posted on the dev mailing list.