This bounced because of configuration problem on the mail server, so I'm resending it.
-Christopher ------- Forwarded Message From: "Stephen Andrew Neuendorffer" <[EMAIL PROTECTED]> To: Nilgun Fescioglu Unver <[EMAIL PROTECTED]>, [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: [Ptolemy] Re: memory problem Date: Wed, 31 Mar 2004 08:55:16 -0800 The culprit is apparently the Display actor, which internally uses a JTextArea, which is a known memory hog: A quick google search turns up: >I can't believe this exists in Swing, but I've found >that when I loaded a 2MB file into JTextArea it >creates literally 394,000+ java.lang.ref.Finalizer >objects that hang around event after the JTextArea is >released. What's worse is my memory usage spikes to >65MB! That's 30 times the size of the text string! I >don't know what java.lang.ref.Finalizer object is, or >why it gets created. After 6000 iterations, that's roughly 1.3 MB of text.... At 01:26 PM 3/30/2004 -0800, Nilgun Fescioglu Unver wrote: >Hi, > >Sorry if you received this message for the second >time.. > >I have a java.lang.OutOfMemory error problem with my >model developed in Ptolemy II version 3.0.2. > >I am working on a model which uses an ArrayToken (of >180 tokens) and my actors change the value of the >tokens in each iteration. As tokens are immutable I am >creating new tokens in each iteration. During the run >time after several iterations the system stops with an >error java.lang.OutOfMemory. I thought some problem >with garbage collection is creating the problem so I >tried calling System.gc at the end of fire() function >in my actors but there was no change in the number of >iterations before getting the error. > >I tried to generate the same problem with the actors >of Ptolemy and created a simple model using the >ArrayExtract actor (the xml file is attached) and ran >into the same problem after several iterations (6143 >iterations on a computer with 512MB Ram, Windows XP >operating system, java version 1.4.2 ). > >Could you help me to find out the reason of this >problem? And how can I continue the simulation without >running out of memory? > >Thanks, >Nilgun Fescioglu Unver > <<Attachment deleted>> ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]