Memory increasing when using enumerating processes
Posted: Mon Oct 20, 2008 4:40 pm
Hello,
I'm using MadKernel for enumerating all processes. This are the steps:
1 - Ennumerate them
2 - Open a process
3 - Enumerate them
4 - Close a process
5 - Enumerate them
When my program is on step 1, it's memory is X. But when it's on step 5, it's memory is X+Y. So it keep increasing, aways.
Here's a leak detection result that I aways get:
As you can see, it aways has something to do with MadKernel functions. Then I'm geting this leak. Is there any way for releasing all memory used by madKernel after enumerating processes?
Thanks
I'm using MadKernel for enumerating all processes. This are the steps:
1 - Ennumerate them
2 - Open a process
3 - Enumerate them
4 - Close a process
5 - Enumerate them
When my program is on step 1, it's memory is X. But when it's on step 5, it's memory is X+Y. So it keep increasing, aways.
Here's a leak detection result that I aways get:
Code: Select all
045162FC BlockSize: 136 Class: TIProcesses
ST: 0050A5B1 [madKernel] [Processes] []
ST: 0054DE03 [uClassMemoryProtection] [TMemProtectionThread.Execute] [66]
ST: 004377FD [Classes] [ThreadProc] [9372]
ST: 004042FA [System] [ThreadWrapper] [11565]
ST: 7C80B683 [] [Unknown function at GetModuleFileNameA] []
0725C658 BlockSize: 26 GETMEM
ST: 00509E7F [madKernel] [TIProcesses.RefreshItems] []
ST: 005097E9 [madKernel] [TIProcesses.Create] []
ST: 0050A5B1 [madKernel] [Processes] []
ST: 0054DE03 [uClassMemoryProtection] [TMemProtectionThread.Execute] [66]
ST: 004377FD [Classes] [ThreadProc] [9372]
ST: 004042FA [System] [ThreadWrapper] [11565]
ST: 7C80B683 [] [Unknown function at GetModuleFileNameA] []
0725F42C BlockSize: 120 DynArray: Ref: 1 Len: 7
ST: 00405A1E [System] [@DynArraySetLength] [16117]
ST: 004F0331 [madBasic] [TICustomBasicList.AddItem] []
ST: 00509B10 [madKernel] [RefreshItem] []
ST: 00509E7F [madKernel] [TIProcesses.RefreshItems] []
ST: 005097E9 [madKernel] [TIProcesses.Create] []
ST: 0050A5B1 [madKernel] [Processes] []
ST: 0054DE03 [uClassMemoryProtection] [TMemProtectionThread.Execute] [66]
ST: 004377FD [Classes] [ThreadProc] [9372]
ST: 004042FA [System] [ThreadWrapper] [11565]
ST: 7C80B683 [] [Unknown function at GetModuleFileNameA] []
0725FB68 BlockSize: 224 Class: TIProcess
ST: 004F4C58 [madKernel] [AddKernelObj] []
ST: 00509ABE [madKernel] [RefreshItem] []
ST: 00509E7F [madKernel] [TIProcesses.RefreshItems] []
ST: 005097E9 [madKernel] [TIProcesses.Create] []
ST: 0050A5B1 [madKernel] [Processes] []
ST: 0054DE03 [uClassMemoryProtection] [TMemProtectionThread.Execute] [66]
ST: 004377FD [Classes] [ThreadProc] [9372]
ST: 004042FA [System] [ThreadWrapper] [11565]
ST: 7C80B683 [] [Unknown function at GetModuleFileNameA] []
07260658 BlockSize: 84 Class: TICriticalSection
ST: 00509754 [madKernel] [TIProcesses.Create] []
ST: 0050A5B1 [madKernel] [Processes] []
ST: 0054DE03 [uClassMemoryProtection] [TMemProtectionThread.Execute] [66]
ST: 004377FD [Classes] [ThreadProc] [9372]
ST: 004042FA [System] [ThreadWrapper] [11565]
ST: 7C80B683 [] [Unknown function at GetModuleFileNameA] []
07267618 BlockSize: 24 DynArray: Ref: 1 Len: 1
ST: 004F0331 [madBasic] [TICustomBasicList.AddItem] []
ST: 00509B10 [madKernel] [RefreshItem] []
ST: 00509E7F [madKernel] [TIProcesses.RefreshItems] []
ST: 005097E9 [madKernel] [TIProcesses.Create] []
ST: 0050A5B1 [madKernel] [Processes] []
ST: 0054DE03 [uClassMemoryProtection] [TMemProtectionThread.Execute] [66]
ST: 004377FD [Classes] [ThreadProc] [9372]
ST: 004042FA [System] [ThreadWrapper] [11565]
ST: 7C80B683 [] [Unknown function at GetModuleFileNameA] []
0726A8DC BlockSize: 224 DynArray: Ref: 1 Len: 54
ST: 00405A1E [System] [@DynArraySetLength] [16117]
ST: 004EF846 [madBasic] [TIList.Grow] []
ST: 004F02EC [madBasic] [TICustomBasicList.AddItem] []
ST: 00509B10 [madKernel] [RefreshItem] []
ST: 00509E7F [madKernel] [TIProcesses.RefreshItems] []
ST: 005097E9 [madKernel] [TIProcesses.Create] []
ST: 0050A5B1 [madKernel] [Processes] []
ST: 0054DE03 [uClassMemoryProtection] [TMemProtectionThread.Execute] [66]
ST: 004377FD [Classes] [ThreadProc] [9372]
ST: 004042FA [System] [ThreadWrapper] [11565]
Thanks