Downward Facing God
Downward Facing God

Reputation: 490

What accounts for the difference between the size of the heap (as reported by umdh) and the (private) working set (as reported by task manager)?

C++ native code running on Windows 7. VS2008.

A particular state change on my application increases the working set (private working set) from 16Mb(6.5Mb) to 38Mb(22Mb). As this seemed excessive I examined the heap change using umdh. The difference between the heap before and after I find an increase of ~9Mb.

What accounts for the additional memory in the working set?

I suspect it might be dll loading, but how can I confirm this and break it down?

Upvotes: 3

Views: 609

Answers (1)

MartyTPS
MartyTPS

Reputation: 530

When an application requests memory windows gives it much more than it asks for so that subsequent request from all apps does not result in excessive fragmentation. For example you ask for 1 byte at a time your working set will not grow 1 byte at a time or by page at a shot but could be by megabytes at a shot. Working set are the pages in physical memory. Also windows can take the excess away from you if something else needs it.

Upvotes: 0

Related Questions