Re: Pellet size Error (Lorenz B., Rafael Goncalves )
I'd also suggest starting the virtual machine with "-XX:+PrintGC", which prints basic GC activity to the console. That will give you a sign of when memory is starting to disappear.
I would also add the "-XX:HeapDumpOnOutOfMemoryError" flag, which will generate a heap dump when you run out of memory, which will show where the memory is being used.
This dump can be analyzed using tools like the Eclipse foundation's MAT.