ts-7000
[Top] [All Lists]

[ts-7000] Re: Java out-of-memory issue

To:
Subject: [ts-7000] Re: Java out-of-memory issue
From: "mikeciaraldi" <>
Date: Wed, 28 May 2008 02:08:34 -0000
--- In  "Brian Jewell" <> wrote:

> 
> We are using a TS7250, running the Java J9 VM. Every so often, there are
> "java.lang.OutOfMemoryError" exceptions thrown in the code. There
seems to
> be no consistencies to the problem. It sometimes happens within hours of
> rebooting the TS, or sometimes within days, or sometimes not at all.

I (well, actually some of my students) had a problem like this once on
a PC running windows XP. We didn't have a profiler, so we used the
Runtime object.

You can call Runtime.getRuntime(), which returns a reference to this
virtual machine's one-and-only Runtime object. Once you have that, you
can query it for maximum, total, and free memory. So we stuck some
println()'s at strategic places in the code and watched the free
memory go up and down. We eventually found two different problems:

-- A function which was mistakenly looping too many times,
instantiating objects and sticking them into a tree. Fixing the bug
fixed the problem.

-- A function which needed to recurse quite deeply. Analyzing the
memory usage led us to start the VM with a command-line argument that
told it to ask for more memory. The analysis told us how much to ask for.

Maybe this will help...


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU