[racket-dev] memory issues

From: Stephen Bloch (bloch at adelphi.edu)
Date: Mon Apr 23 09:50:21 EDT 2012

On Apr 23, 2012, at 8:12 AM, Robby Findler wrote:

> 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?

The number of seconds is wall-clock time from when the window opens to when I see a cursor in it.  For most of that time, the recycling icon in the bottom-right corner of the DrR window is on.

The number of megabytes is the number shown in the bottom-right corner of the DrR window, next to the recycling icon.

Wait: I just downloaded the release candidate to my office machine to try this again, and there IS NO number shown in the bottom-right corner.  Maybe I was using a different version on my home laptop -- probably 5.3.0.2 or something.

I have to run to class.  I'll look into this more later today.



Stephen Bloch
sbloch at adelphi.edu



Posted on the dev mailing list.