Oz and Mozart Users Mailing List

Re: GC problem?


From: Robin Lee Powell (rlpowell@digitalkingdom.org)
Date: Fri Aug 24 2001 - 19:19:38 CEST


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.

Can you suggest how to make it tail recursive? Especially in the Stress
call.

> The size of the stack will drop only after the next garbage collection (it
> does indeed, I checked).

Ah, that's good. How often does garbage collection occur? I figured 10
seconds would be enough.

> Let me also mention the Oz Panel, a tool that observes memory size,
> number of threads, etc. So start the Panel, run your program (all
> within in the OPI), and after you have run your program, invoke a GC
> manually (you can do that from the Panel after you have selected
> Configure in the Options menu).

I'm doing this entirely text-based, and that can't really change without
a whole lot of effort on my part.

Thanks for the tip, though.

-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/.



This archive was generated by hypermail 2b29.