.NET on XPE and paging files

B

ben

Hi,

Hopefully someone could shed some light on this: We've got a custom
..Net app running on XPE, which eventually gets a out of memory
exception.

The task manager states the application is using between 5 and 10 MB,
but the virtual memory is up to 130 MB.

We have not even enabled the paging file, so shouldn't the virtual
memory be unavailable?

Could anyone point me to an article or discussion on how we could have
used 130MB of VM when paging is disabled? Also any info on stopping
..NET framework from chewing up too much physical RAM on XPE??

Thanks,
Ben
 
K

KM

Ben,

I'm going to try to answer you VM questions although I am not an expert in
this topic.

I think what Task manager shows is just what virtual memory usage counter
reports ("Process: Private Bytes" in performance monitor).

The VM size in Task manager doesn't really mean process VM usage but rather
means the
current size of memory that the process has allocated that cannot be shared
with other processes. So non-zero value here yet doesn't mean that you are
using pagefile in your image.
While the mem usage column corresponds to "Process: Working Set" performance
counter and just equals to the working set size of the process.

I never trusted those numbers with MS Task manager - too much confusing
terminology - but the is absolutely a better tool to explore process memory
allocations - Process Explorer from www.sysinternals.com.


Obviously, .Net stuff may have some memory leaks by itself but I'd rather
suggest you to explore your app first. How does the app work on XP Pro? Does
it show the same memory consumption behavior?
Also, when you say .Net what language you are using - C#, VB, etc.? For the
first two you'd rely on the garbage collection to clear up discard objects
in memory. Just make sure you are release all the references to unused
objects.
There are quite a lot articles on MSDN describing various techniques how to
optimize .Net app memory usage. It is a bit out of scope of XPe topics so I
suggest you to google for this.
Also, you can always debug your app on the target (remote debugging would be
more suitable there) to see what's going on there.

Regards,
KM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top