Re: Memory Leak in the Game Engine
אקסטרים
Memory Leak in the Game Engine
aantn
02-11-2009, 6:12
The game engine seems to leak memory every match. (By "match," I'm referring to one game with 4 players.)
After 100 matches the game engine slows down significantly. If I try running 1000 matches, Java eventually throws an exception when the game runs out of memory.
Can anyone else confirm this? If I have time, I might try to write a patch to fix this issue.
Re: Memory Leak in the Game Engine
GalDor
02-11-2009, 7:53
This never happened to me. How much RAM do you have?
Re: Memory Leak in the Game Engine
aantn
02-11-2009, 8:44
Only 512 mb, but it shouldn't make any difference. The game engine still shouldn't leak memory as time goes on.
Re: Memory Leak in the Game Engine
aantn
02-11-2009, 8:49
Just to clarify, the first 100 matches run in a few seconds. The next hundred (100-200) take longer to run and by the time that I reach the 800th match it takes a few seconds to run each individual match.
GalDor,
Can you confirm the slow down?
Re: Memory Leak in the Game Engine
aantn
02-11-2009, 8:51
Actually, it seems like I can't confirm the slowdown 100% of the time. I'll look into this a bit more and post if I find something.
Re: Memory Leak in the Game Engine
GalDor
02-11-2009, 10:46
I've had no slowdown whatsover. Furthermore, the engine is written in java, which has an automatic garbage cleaner, so I can't see how there can be any leaks (I have read the code - it doesn't do anything that might cause a leak in a garbage collected language, such as keep an array that grows with each match or something. The code's quite simple and elegant...). Is it possible that this has something to do with your system?