0

According to process explorer / task manager my application has a private working set size of around 190MB even while not performing a specific task, which is way more than I would expect it to need. Using FastMM I have validated that none of this is an actual memory leak in a traditional sense.

I have also read the related discussion going on here, which suggests using FastMM's LogMemoryManagerStateToFile();. However the output generated states "21299K Allocated, 49086K Overhead", which combined (70MB) is way less than the task manager suggests.

Is there any way I can find out what causes the huge differences, might 190MB even be an expectable value for an application with ~15 forms? Also, is having 70% overhead "bad", any way of reducing that number?

Community
  • 1
  • 1
DNR
  • 1,619
  • 2
  • 14
  • 22
  • It doesn't sound like that's a problem. Remember also that FastMM is not the only thing allocating memory in your process. – David Heffernan Dec 11 '13 at 11:48
  • http://stackoverflow.com/questions/215285/ – Free Consulting Dec 11 '13 at 11:54
  • To maybe word it more easy, my application uses 120MB of RAM that is not tracked by FastMM and I'm trying to get more details in order to eventually reduce it. – DNR Dec 11 '13 at 12:14
  • What's your concern or target memory footprint? – Marcus Adams Dec 11 '13 at 13:14
  • There is no specific target footprint, I'd just like to understand why my application is using up so much memory in order to evaluate whether it's fine as it is or uses more than it should due to bad design. – DNR Dec 11 '13 at 13:37

2 Answers2

1

You can use VMMap from Sysinternals to get a complete overview of the virtual memory addres space your proces is using. This should allow you to work out the difference you are seeing between taks manager and FastMM.

I doubt that FastMM reports or even can report sections like Mapped File, Shareable, Page Table while those sections do occupy Private WS.

enter image description here

Lieven Keersmaekers
  • 57,207
  • 13
  • 112
  • 146
  • This tells me that I have 172MB of "Private Data" in my private working set, I'm not quite sure how to use that information to find out what actually is occupying this space ... – DNR Dec 11 '13 at 12:39
  • When you click the `private data` section at the top, you filter the bottom to only view that section. The bottom then tells you the addres and the size of that memory block. As for usage, these area get's used for instance to hold the TEB (Thread Environment Block) and PEB. You can try to look for strings in this area by using `view -> strings` but chances are low you'll find any in this area. In the end, if you want to see what get's stored at these adresses, fire up your debugger and look at the memory view. Interpreting what these bytes actually mean is another matter. – Lieven Keersmaekers Dec 11 '13 at 13:16
0

DDDebug can give you insights about memory allocation by objects in your app. You can monitor changes live.

Test the trial version or checkout the introductory video on the website.

Erik Virtel
  • 810
  • 2
  • 9
  • 27