Re: Method to find out RAM usage of WinCE Applications
- From: "Ross Jordan [MSFT]" <ross.nospam.jordan@xxxxxxxxxxxxx>
- Date: Wed, 7 Mar 2007 12:16:15 -0800
You don't need the source code of the 3rd party application to query it, you just need a handle to its process (use OpenProcess on the corresponding process id to get such a process handle).
-Ross
"Jimmy Lim" <JimmyLim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:5DEDA4B1-DCC7-44D4-BB5D-4455BC995DC1@xxxxxxxxxxxxxxxx
Hi Ross,
Thanks for the advice. However I do not have the source code for each of
the process running in the WinCE devices. Hence in there anyway to find out
the memory usage of each process throught a 3rd party means?
Sincerely
Jimmy
"Ross Jordan [MSFT]" wrote:
You can determine granular memory usage of other processes with VirtualQuery
(VirtualQueryEx in CE6). You can put it together with something like this
(applies to memory layout of CE6):
for (addr = 0x10000; addr < 1024*1024*1024; addr +=
(DWORD)mbi.RegionSize) {
if (!VirtualQueryEx(hProc, (LPCVOID)addr, &mbi, sizeof(mbi)))
break;
if (mbi.State == MEM_FREE)
dwAvailVirtual += (mbi.RegionSize -
((~(DWORD)mbi.BaseAddress+1)&0xffff)) & 0xffff0000;
}
For (system-wide) physical memory status, see GlobalMemoryStatus api.
-Ross
"Jimmy Lim" <JimmyLim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9E5918B7-129D-4418-A1CD-4A91B2B8E8F8@xxxxxxxxxxxxxxxx
> Hi All,
>
> I have a question to ask. I have a few WinCE Application (developed by
> 3rd
> parties) running on a device. Is there anyway to find out the RAM usage > of
> each application? Are there any utilities software i can make use of?
>
> Sincerely
> Jimmy
.
- References:
- Re: Method to find out RAM usage of WinCE Applications
- From: Ross Jordan [MSFT]
- Re: Method to find out RAM usage of WinCE Applications
- Prev by Date: Re: Method to find out RAM usage of WinCE Applications
- Next by Date: RE: Bitmap Problem
- Previous by thread: Re: Method to find out RAM usage of WinCE Applications
- Next by thread: unresolved external symbol errors, VC++
- Index(es):
Relevant Pages
|