-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak in interface/tbcore.c #28
Comments
After "quit" the engine quits and any allocated memory will be released by the OS no matter what. However, I am reasonably sure that the engine itself releases all memory allocated by the probing code before it actually quits. (OK, that is not part of the interface/tbcore.c code, but that is not a full engine anyway. I am talking about Cfish and Stockfish.) After "stop" no memory is deallocated because the engine will likely search another position. The "more and more memory" consumption is not caused by Pairsdata allocations but by more and more of the TB files getting swapped into shared memory (shared with any other engines also accessing the TBs). |
Setting the TB path (SyzygyPath) to "" releases all memory. I think that is part of the interface/* code but I could be mistaken. |
Indeed setting the SyzygyPath to "" before closing the engine seems to free the allocated PairsData. I will use that. Thanks. |
Hi.
It seems that the memory allocated for struct PairsData in setup_pairs() is never freed after STOP and even after QUIT. Visible e.g. in Arena GUI that shows the engine consuming more and more memory when probing the TB.
Bug or design?
I would suggest some cleanup function that could be called from the engine.
The text was updated successfully, but these errors were encountered: