Re: Determining Process Memory Usage
- From: Kap <Kap@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 1 Mar 2007 07:20:05 -0800
Thank you for your help Paul. I will look into ToolHelp API. I know the best
way to debug this is by reproducing the issue inhouse (which I haven't been
able to do yet). I guess I just have to keep trying :)
"Paul G. Tobey [eMVP]" wrote:
You might be able to write a supervisor program which would use the ToolHelp.
API to get heap information for each and every running process and store
that somewhere periodically. If it's not your code that's leaking, I'm not
sure what you'd be able to do with the information (let's say that
device.exe is at fault). You'd still have to be able to debug to get
anywhere with a fix.
Paul T.
"Kap" <Kap@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B07193A8-6B42-493B-84A2-B8153993FD7B@xxxxxxxxxxxxxxxx
We have few thousand units out there in various locations and they are
idential in all possible ways. They all doesn't show any memory leaks
execpt
at one location. All units at that location (5 units) demonstrate this
memory
leak. I have remote tools working but I can't reproduce the issue at my
desk.
It's not possible for me to go there just for debugging. That's why remote
tools aren't much of a help in this situation.
I can trap my allocations in the code as you said but I doubt it's my code
that's doing it since vast majority of the units don't demostrate the
leak. I
just wanted to log the memory usage for each process to atleast find out a
clue of what's going on.
Thanks.
"Paul G. Tobey [eMVP]" wrote:
Well, you could trap new and delete, malloc and free, etc. with your own
library and keep track of what is allocated and what is freed.
Examination
of your code is often the fastest way to find leaks, though and you don't
need remote tools for that. If you still aren't sure, I can recommend a
tool, but it's going to need a remote connection, just like the MS remote
tools. Entrek TOOLBOX is *very* good at this. Why are remote tools a
problem?
Paul T.
"Kap" <Kap@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:05735CF7-1D74-46C0-8FC2-2D5BA18E913D@xxxxxxxxxxxxxxxx
May be I need to explain my situation here then. I have a device that
appears
to have a memory leak. I found it out by periodically logging the
memory
allocated by the system as a whole (using GlobalMemoryStatus function).
Now I
need to find out if this leak is caused by any of the processes I am
running
on the device. Can any one show me some light on how to do that without
using
the remote debugging tools?
Thanks.
"Paul G. Tobey [eMVP]" wrote:
There's not going to be that sort of information. Data is not paged
out,
ever.
Paul T.
"Kap" <Kap@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E735D4D4-AACF-4035-8BDC-6F9E19AFF094@xxxxxxxxxxxxxxxx
Basically what's available through GetProcessMemoryInfo(). I am
specifically
interested in PeakWorkingSetSize and WorkingSetSize. What I am
trying
to
do
is to monitor total heap usage of a given process over time.
"Paul G. Tobey [eMVP]" wrote:
What do you mean by "memory status of a process"? What are you
trying
to
find out?
Paul T.
"Kap" <Kap@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3C8FD7AD-2A27-49F5-AD37-A81B33379997@xxxxxxxxxxxxxxxx
Windows CE doesn't support GetProcessMemoryInfo(). The fuction
GlobalMemoryStatus() gives you information about physical and
virtual
memory
of the system as a whole but not on process by process basis. I
am
in
an
environment where I can't use remote debugging tools. Is there
anything
similar to GetProcessMemoryInfo in CE? How do I determine the
memory
status
of a process?
Thanks.
- Prev by Date: CE 6.0 documentation problems
- Next by Date: Re: Windows CE 6.0 evaluation software
- Previous by thread: CE 6.0 documentation problems
- Next by thread: Re: Debug API interrupt running process.
- Index(es):
Relevant Pages
|