Bombe
Memory not freed on Linux (Ubuntu)?
Hi, I am playing this game on a Ubuntu machine.
I am a bit in trouble, that if I run the "robot", the game sometimes crashes within ~1 hour, and I've found the memory usage for this game gradually increases until it consumes all the memory of the machine and triggers the crash.
Are there any solution to it? Or could you fix this? thx!
Originally posted by brejc8:
That unfortunately is the expected behaviour. Freeing the data in the application doesn't necessarily return the memory to the OS. It is up to libc whether it wants to or not. When you have applications which fluctuate memory use you start getting memory fragmentation which makes it even harder to release the memory. I did Valgrind and memory profile it and it is correctly freeing all memory, yet the process doesn't shrink. You can try LD_PRELOAD some malloc library that does a better job than libc.
< >
Showing 1-3 of 3 comments
brejc8  [developer] Apr 12 @ 3:45am 
Hi. The game doesn't leak memory and we are Valgrind clean, but it can suffer from memory fragmentation when you have runaway robots creating millions of regions into the queue. Look out for explosive rules. Unfortunately there isn't anything we can fix here.
Hi, thank you for the reply!
I have observed the behavior, that when the robot is stopped and restarted, or when the rules are modified, or even when the mode is changed (e.g., vanilla to <60 rules), the memory usage does not reset; it remains >10GB. In these cases, the robot should forget boards in the past, but it appears it indeed does not so.
Could you re-check your code? Or are there other possible reasons? Thanks!
The author of this thread has indicated that this post answers the original topic.
brejc8  [developer] Apr 12 @ 7:46am 
That unfortunately is the expected behaviour. Freeing the data in the application doesn't necessarily return the memory to the OS. It is up to libc whether it wants to or not. When you have applications which fluctuate memory use you start getting memory fragmentation which makes it even harder to release the memory. I did Valgrind and memory profile it and it is correctly freeing all memory, yet the process doesn't shrink. You can try LD_PRELOAD some malloc library that does a better job than libc.
< >
Showing 1-3 of 3 comments
Per page: 1530 50