<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=US-ASCII">
<META content="MSHTML 6.00.2900.5969" name=GENERATOR></HEAD>
<BODY id=role_body style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Arial" bottomMargin=7 leftMargin=7 topMargin=7 rightMargin=7><FONT id=role_document face=Arial color=#000000 size=2>
<DIV>For one of problems Greg has reported in his earlier emails: that DrRacket
can be crashed even when a memory limit is set, I've seen this as well, fairly
commonly on Windows XP and Vista with v4.x and now v5.0.</DIV>
<DIV> </DIV>
<DIV>If it is of any use, I can consistently reproduce this on my XP netbook,
with the following (toy) program using v5.0.</DIV>
<DIV> </DIV>
<DIV>#lang scheme</DIV>
<DIV> </DIV>
<DIV>(define (go [n 0] [foo '()])<BR> (go (+ n 1) (cons (build-vector
1000000 (lambda (n) (make-string n #\a))) foo)))</DIV>
<DIV> </DIV>
<DIV>(go)</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>I just click the "Run" button, and wait for bad things to happen... I first
get an error message stating "Racket Virtual Machine is out of memory.
Aborting". Then I get a Microsoft Visual C++ Runtime Library dialog box
indicating a runtime error, where the "application has requested the Runtime to
terminate it in an unusual way". Finally, I get a dialog box reporting that
"Racket GUI application has encountered a problem and needs to close. We
are sorry for the inconvenience.", and offering to send a report to
Microsoft.</DIV>
<DIV> </DIV>
<DIV>For sure, I can reproduce this when I have the memory limit set
to 1024 MB or 2048 MB. So far I have been able to reproduce this with the
memory limit set to >= 750 MB. At 512MB, the memory limit correctly kicks,
and I get a DrRacket error message, but DrRacket does not crash.</DIV>
<DIV> </DIV>
<DIV>Curiously, when the memory limit is set to 700MB, I get a different error
message. I don't get the dialog box about exceeding the memory limit; DrRacket
gives an "out of memory" error in the interactions panel, but does not
crash.</DIV>
<DIV> </DIV>
<DIV>I've just retested with the latest nightly build [<EM>Welcome to DrRacket,
version 5.0.0.9--2010-07-14(d162667/a) [3m].] </EM>and gotten the same results.
With the latest nightly build, I can reproduce the crash with a memory limit as
low as 650 MB. (At a memory limit of 600MB, the memory limit error dialog did
kick in, with no crash.)</DIV>
<DIV> </DIV>
<DIV>My impression is that memory usage, as reported by the Windows Task
Manager, is not even close to the memory limit at the time of the crash (e.g.
<200MB, or even much smaller).</DIV>
<DIV> </DIV>
<DIV>Jim</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>
<DIV>In a message dated 7/14/2010 5:23:06 P.M. Central Daylight Time,
greghendershott@gmail.com writes:</DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: blue 2px solid"><FONT style="BACKGROUND-COLOR: transparent" face=Arial color=#000000 size=2>Good
news, I found and fixed my memory over-consumption, albeit the hard
way.<BR><BR>Some take-aways:<BR><BR>[1] I remain convinced that DrRacket won't
use > 1 GB for on Win64.<BR>[2] It would be great to see DrRacket as a full
64 bit app on Windows<BR>and Mac OS X someday.<BR>[3] The intended use of
Limit Memory and its interaction with actual<BR>memory available from the OS,
could use some better doc/explanation.<BR>It will suggest you increase its
limit when you hit, but on the list<BR>I'm learning that can backfire, and
anyway I've seen the limit ignored<BR>... basically it's all pretty
confusing.<BR>[4] More memory debugging tools would be helpful, as it's
non-trivial<BR>to correlate Racket data to bytes (e.g. no C-style
sizeof).<BR>[5] I learned that some of you seemingly don't use the
DrRacket<BR>environment very much, yourselves? :)<BR>[6] Speaking of DrRacket
and debugging, the debugger needs an option<BR>to limit the display of large
items; otherwise DrRacket becomes very<BR>unresponsive and stepping in the
debugger can take many, many seconds<BR>between each step. Debugging = pain is
the wrong lesson to teach new<BR>folks IMHO.<BR>[7] Although DrRacket is
already a good "IDE", many people know stuff<BR>like Eclipse and Visual
Studio, and this is a big part of the<BR>experience of the "language" and
important for broader acceptance<BR>(assuming that's a
priority?).<BR><BR>Sorry if that's a random brain-dump but I hope it may be
helpful. Also<BR>I hope it's clear that if I didn't like Racket I wouldn't
bother<BR>offering the feedback, so although this may not feel like
a<BR>compliment, indirectly it is. :)<BR><BR>Cheers,<BR>Greg<BR><BR>On Tue,
Jul 13, 2010 at 8:40 PM, Robby Findler<BR><robby@eecs.northwestern.edu>
wrote:<BR>> On Tue, Jul 13, 2010 at 6:39 PM, Greg Hendershott<BR>>
<greghendershott@gmail.com> wrote:<BR>>> OK mister smartypants.
:)<BR>><BR>> Indeed! :)<BR>><BR>>> I set the limit back to 1024
MB.<BR>>><BR>>> And ... it crashed again DrRacket
again.<BR>><BR>> That limit is probably high enough to be ineffective as
an actual<BR>> limit. I don't understand the precise connection between
what<BR>> current-memory-use reports and what the OS says that a process
is<BR>> using, but you want to use the numbers for the former, not the
latter.<BR>><BR>>> Just like it did back when I decided to try
setting it to "unlimited"<BR>>> in the first place, to avoid this
happening.<BR>>><BR>>> Seriously, is the idea that users are
supposed to:<BR>>> [1] Understand the maximum memory for their system.
(Which isn't<BR>>> documented, but on Win64 is 2 GB ... unless it is
actually 1 GB.)<BR>>> [2] Set the DrRacket memory limit to whatever
value they guessed in step 1.<BR>>> [3] Watch DrRacket abend and lose
their work, anyway?<BR>>><BR>>> I'm not trying to be a PITA, I
genuinely don't understand the intended usage.<BR>>><BR>>> Also I
guess I'm frustrated that I have a memory utilization issue<BR>>> which
is my own darn fault, but I have no clear mental model, yet,<BR>>> what
the heck is happening and how to track it down. In which regard I<BR>>>
suppose I feel like an Alan Perlis punch-line: A programmer who
knows<BR>>> the value, and actually DOES want to understand the cost ...
but<BR>>> can't. Like, if I have to ask the price, I can't afford it ...
?<BR>><BR>> ha!<BR>><BR>> IMO, we are missing good memory
debugging tools, but this is a big<BR>> project so likely you'll have to
stick with what we have so far.<BR>><BR>> If you build with one of the
alternate collects (sgc?) you can get a<BR>> fair amount of memory
debugging information. Its pretty low-level and<BR>> there is no
visualization to help you understand, but if you are<BR>> careful and think
hard about what it is telling you, you might be able<BR>> to get some use
out of it.<BR>><BR>>
Robby<BR>><BR>_________________________________________________<BR>
For list-related administrative tasks:<BR>
http://lists.racket-lang.org/listinfo/users<BR></FONT></BLOCKQUOTE></DIV></FONT></BODY></HTML>