View Single Post
  #516  
Old 05-21-2007, 05:22 PM
jukofyork jukofyork is offline
Senior Member
 
Join Date: Sep 2004
Location: Leeds, UK.
Posts: 2,551
Default Re: Sklansky bucks calculator (php script)

[ QUOTE ]
what is the maximum number of hands ppl have successfully imported. I keep getting an out of memory exception when trying to do over 40k hands. I have 2 gigs of ram and it hovers around 85% usage when running this program.

An error occured. The error message was:
Exception of type 'System.OutOfMemoryException' was thrown

Ideas?

[/ QUOTE ]
Is this the Java app that threw that exception or Phil's .NET app? If it's the Java app it's simply the virtual machine has eaten up all your memory without triggering the garbage collector and it can be fixed by using the command line switches to run the app. I haven't tried using this so I'm not sure if it's in a JAR file or not, but assume it runs from a file called "eval.jar" and your Java VM is installed at "C:\J2SDK1~1.2_0\bin\", you would make a batch file that had this line in in:

C:\J2SDK1~1.2_0\bin\java -Xms250m -Xmx250m -jar eval.jar

This would mean Java would allocate the 250MB right at the start and then trigger the garbage collector whenever it exhausts it's heap.

This used to be quite a common problem with Linux/Unix Java and I've had it bring down Linux/Unix machines by just consuming all the memory and swapfile without triggering the garbage collector. Also, fixing the amount of memory at the start tends to make Java apps run slightly smoother, so it's a good idea to do this whenever you run any Java app even if you aren't having this problem.

Juk [img]/images/graemlins/smile.gif[/img]
Reply With Quote