Re: Finding Mem Leaks in Windows Mobile

Tech-Archive recommends: Fix windows errors by optimizing your registry



I would also recommend AppVerifier. It is not ideal and sometimes hard to
configure, but from my experience it is the best available tool. What is
your exact problem with AppVerifier?

Is there a way to get the physical memory
usage for a process in WinCE/WinMo?
For heap allocated blocks you can enumerate all heaps for a process using
Toolhelp API and calculate the total.

--
Yaroslav Goncharov
Pocket PC Developer Network coordinator, http://pocketpcdn.com
Spb Software House, http://spbsoftwarehouse.com


"Mark J" <mjanke@xxxxxxxxxxxxxx> wrote in message
news:02fdeda7-a30e-4bd1-80a3-642acb5bef77@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In the past in developing desktop code, I have used _CrtMemCheckpoint
and _CrtMemDifference methods and code checkpoints to find memory
leaks in my code. This was a very simple technique that got results.
Such methods do not appear to be supported in WinCE and WinMo. Online
info on this subject typically suggests using the Application Verifier
that is included with the CE Test Kit (CETK). I have had a very
difficult time getting the verifier to run and then to show me where
my leak is. For this reason, I thought about writing a very simple
class that would support acquiring snapshots of my processes physical
memory usage. I was able to find the GlobalMemoryStatus() method to
get a snapshot of all processes, but I am having trouble finding a
method or technique that will give me the physical memory used by my
process (given its handle). Is there a way to get the physical memory
usage for a process in WinCE/WinMo?


.



Relevant Pages

  • Re: [RFC][0/3] Virtual address space control for cgroups (v2)
    ... > Trying to account/control physical memory or swap usage via virtual ... > swap space usage without breaking a large class of apps, ... I find it hard to understand why applications would use sparse ...
    (Linux-Kernel)
  • Task Manager PF Usage makes no sense
    ... I did a test by starting a Virtual PC, which increased the PF Usage by ... pretty much the same amount as the decrease in Physical Memory> Available ... Another odd thing is that under the Process tab, VPC was only listed as ...
    (microsoft.public.windowsxp.general)
  • Re: available memory from task manager
    ... consumed RAM (physical memory) + paging file, ... PF Usage is actually the system commit charge. ... I want to confirm with you about the term commit charge. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Exchange Memory Issue
    ... configuration. ... the task manager the PF Usage is up to 1.4GB. ... Physical Memory ...
    (microsoft.public.exchange.admin)
  • Re: disk keeps crunching away ...
    ... > process cpu usage is high. ... I have a noisy disk, ... and out of physical memory trying to handle the work load. ...
    (microsoft.public.win2000.hardware)