On Fri, Aug 24, 2001 at 10:34:55AM +0200, Christian Schulte wrote:
> That's definitely not a Mozart problem, it's your program that is at fault.
> The problem is that the method add is not tail-recursive: the recursive call
> to add comes before the call to next. That means the stack of the thread
> executing the initial call to add will grow proportional to its argument.
>
> The size of the stack will drop only after the next garbage collection (it
> does indeed, I checked).
Uhhh, I just added {System.gcDo} calls just before the 10s delays, and
it only drops down to 23MB, even at the end.
Now, at the end there are exactly no variables in scope, except the
reference to the various modules and Stress, so I would expect it to
drop to the same memory usage it had at the first 10s delay, before
Stress has been called. The memory usage at that point is about 8MB.
-Robin
-- http://www.digitalkingdom.org/~rlpowell/ BTW, I'm male, honest. le datni cu djica le nu zifre .iku'i .oi le so'e datni cu to'e te pilno je xlali -- RLP http://www.lojban.org/ - Please send submissions to users@mozart-oz.org and administriva mail to users-request@mozart-oz.org. The Mozart Oz web site is at http://www.mozart-oz.org/.