June 2009


Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sean Luke <[log in to unmask]>
Reply To:
Sat, 13 Jun 2009 20:27:20 -0400
text/plain (29 lines)
A double is eight bytes.  A single double array of size 3000 is 24,000 
bytes.  Let's say that your initial population has a thousand of them. 
That's about 24 megs.  You'll need twice that to do generational GP (50 
megs), and really need twice that again to do GC properly.  So I count 
100 megabytes!  And that's just getting started.

Java's default heap size is somewhere around 40 megabytes all told, I 
think.  What you need to do is *radically* increase your heap size (use 
Java's -Xmx and -Xms options).  Or reduce your population significantly. 
  Or go to steady-state evolution rather than generational.  Or not use 
a three *thousand* element array as an ERC (holy cow!  That's some 
serious experimenting).  Or all of these at once.


K S wrote:
> I setup a GP problem where I extend the ERC class to create terminals.  
> Each terminal holds a double array of size 3000.  I as soon as I make 
> the array non static (so that not all terminals point to the same array) 
> and initialize the array inside the resetNode, I immediately run out of 
> memory.  I know that this means that each terminal is allocating memory, 
> but I expected garbage collection to kick in and free the memory once 
> the terminals are no longer needed.  Any ideas why I am running out of 
> memory?
> ------------------------------------------------------------------------
> Lauren found her dream laptop. Find the PC thatís right for you. 
> <>