Application slow down/Memory Leak
Posted: Fri Mar 18, 2011 11:54 am
Hi,
One of my customers have been experiencing a performance drop in our application and after a few tests, we have noticed that the slow down occurs when the Mem Usage (reported by task manager) reaches a certain figure.
I noticed that I could open a simple dialog box and close it and the memory would increase and would never be recovered. The dialog box opened is very simple - One Say and a button - no fonts or bitmaps used.
Uwe sent me a memory application that when run, my users said that it seemed to help with performance, so I have tried to create my own version of the application withing my application:
The code for this is:
I then call MemoryFlush() within a common routine (in my app, the routine that reads my text data dictionary)
So far, we have tested tmy app in a test environment with a single user and it seems to work quite well - I noticed that the mem usage value was being clawed back.
We are now testing my app in a live environment, so I will let you all know if we have any success.
If this is successful, I would like to change my memoryflush routine to only run if the memory usage is over a set value - does anyone know how get the mem usage value of your application?
Regards,
Pete
One of my customers have been experiencing a performance drop in our application and after a few tests, we have noticed that the slow down occurs when the Mem Usage (reported by task manager) reaches a certain figure.
I noticed that I could open a simple dialog box and close it and the memory would increase and would never be recovered. The dialog box opened is very simple - One Say and a button - no fonts or bitmaps used.
Uwe sent me a memory application that when run, my users said that it seemed to help with performance, so I have tried to create my own version of the application withing my application:
The code for this is:
Code: Select all
FUNCTION MemoryFlush
SetProcess( -1, -1, -1)
RETURN NIL
DLL32 Function SetProcess( ;
hWnd As LONG, nMinWorkingSpace As LONG, nMaxWorkingSpace As LONG ) ;
As LONG PASCAL From "SetProcessWorkingSetSize" Lib "Kernel32.dll"
I then call MemoryFlush() within a common routine (in my app, the routine that reads my text data dictionary)
So far, we have tested tmy app in a test environment with a single user and it seems to work quite well - I noticed that the mem usage value was being clawed back.
We are now testing my app in a live environment, so I will let you all know if we have any success.
If this is successful, I would like to change my memoryflush routine to only run if the memory usage is over a set value - does anyone know how get the mem usage value of your application?
Regards,
Pete