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

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Feb 25 22:09:03 EST 2007

At Sun, 25 Feb 2007 18:43:50 -0500, "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.

Surely you mistyped the program? That should run in constant space.


 (define (recur x) 
   (add1 (recur x)))
 (recur 7)

should indeed use unbounded memory (and DrScheme executes it very
"efficiently" :).

> If you haven't had the unfortunate experience that DrScheme seems to
> freeze up your computer and clicking the Stop button does nothing to
> help it, then you're much luckier than my students and I. Especially
> with images and other processing-intensive tasks, 2GHz machines with
> 512MB of memory running Windows XP would seem to freeze, leaving us
> unable to switch out of the program. Because our district system
> administrator disables student access to the Task Manager, this would
> sometimes result in having to do a hard shutdown.

Robby mentioned that we have plans on this front, though I forgot to
reply before. Our technique depends on 3m, which is why we haven't
finished it before. It should be easy with 3m, but we just haven't
gotten around to it.

Meanwhile, does setting an OS-level limit on a process's memory use
help? In csh under Mac OS X, for example,

 % limit memoryuse 250000
 % drscheme

restricts DrScheme's memory use to about 250MB. DrScheme will still
crash when it runs out of memory, but at least it should cause less
thrashing. (MJ Ray suggested this before; sorry if I missed a


Posted on the users mailing list.