[plt-scheme] Make multiple attempts to open DrScheme join running process?

From: John Clements (clements at brinckerhoff.org)
Date: Sun Feb 25 22:07:47 EST 2007

On Feb 25, 2007, at 3:43 PM, Todd O'Bryan wrote:
> But DrScheme eats memory *very* quickly. I currently have my user  
> memory
> set at a 1GB maximum and that's clearly too much, but I have to figure
> out how to specify how much each user should be allowed to access.
>
> Try this experiment. In Beginning Student, type the following
> definition:
>
> (define (recurse x)
>   (recurse x))
>
> and then evaluate (recurse 7) in the interactions Window.
>
> With one user logged in on my server, running that program hits the  
> 1GB
> level (and kills DrScheme) within 10 seconds.

Hang on; something got missed here.  This is a tail-calling program,  
and should not consume memory.  I just started DrScheme v360, and ran  
this program on my Intel laptop, then scurried off to check memory  
usage.  The CPU meter is completely pinned, at around 100%... but the  
memory use is not growing past 103Meg.  It's completely stable.  Are  
you absolutely sure that this is the program you're running?

If, on the other hand, you're running a program like

(define (recur x) (+ 1 (recur x)))
(recur 7)

...then I would of course expect this to chew all the memory  
available.  In fact, doing this quickly is a sign that DrScheme is  
running very swiftly; or that scheme stack frames are large.  In  
either case, the solution here is certainly to set some kind of  
resource limit.

Also, a note about the "break" button; in a runaway computation, you  
often get much more prompt (er, so to speak) results by hitting cmd-K 
[*] than you do by clicking once on the Break button.

John Clements


[*] ... or whatever keystroke corresponds to the "Scheme > Kill" menu  
entry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2484 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20070225/91b4d1f1/attachment.p7s>

Posted on the users mailing list.