Closed mterrisse closed 2 years ago
Hi Michel,
If FastMM is not releasing address space back the the OS, then the first thing I would check is whether it is not perhaps running in debug mode. What is the result of the FastMM_DebugModeActive call?
Pierre
Hello,
FastMM_DebugModeActive() returns False.
I am trying to build a sample project to help reproducing ithe problem. I will post it here when it is ready. It seams to me that you don't need to have many threads to reproduce it, I have a mono-threaded application that keeps much memory until FastMM_FreeAllMemory.
Regards,
Michel Terrisse
Do you see this behaviour with the default memory manager or FastMM4 as well? If not, that's quite odd.
A test case will be very helpful. If it is too big to post here you're welcome to e-mail it to me directly as well. Thanks.
Hello,
We have run many tests with one of our applications (a web server) and we have noticed this:
So even though we can't figure how it works, FastMM behaves as expected and there is no bug here. You can close this ticket, sorry for the inconvenience.
Regards,
Michel Terrisse
Thank you for the feedback. I'll close the ticket.
Hello,
We have noticed that our server applications consume much memory and never release it to the system. The system is running low virtual memory durably and ends up crashing. In detail they get much memory from medium and large blocs and release them, but OS_FreeVirtualMemory is never called for medium blocs. For medium blocs, OS_FreeVirtualMemory is called only at the end of the application in FastMM_FreeAllMemory. Just before we enter FastMM_FreeAllMemory the memory is very high, after FastMM_FreeAllMemory it is very low. So we tried FastMM_SetOptimizationStrategy (mmosOptimizeForLowMemoryUsage), but it doesn't change anything. If we set a breakpoint in FastMM_FreeMem_InternalFreeMediumBlock_ManagerAlreadyLocked where OS_FreeVirtualMemory is called, we notice that it is never called. Did we miss something? Is there anything else we should set than the optimization strategy?
Regards,
Michel Terrisse