Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get heap size on windows Platform

Tags:

c++

windows

As the question title indicates I want to know if there is a way to get heap size of the current process.

like image 878
Kira Avatar asked Apr 17 '13 15:04

Kira


People also ask

How do I monitor Java heap size in Windows?

The easy way to monitor Heap usage is by using a commercial APM (Application Performance management tool) such as CA Wily APM, AppDynamics, New Relic, Riverbed, etc. APM tools not only monitor the heap usage, but you can also configure the tool to Alert you when Heap usage is not normal.

How do I check my desktop heap usage?

The dheapmon tool is used to determine the desktop heap usage. Ideally, this tool should be scripted, and the output captured throughout the day during peak processing periods.


1 Answers

You can do this - but I think it will be slow and painful.

  1. Use GetProcessHeaps to enumerate through the process heaps.
  2. Use HeapWalk to enumerate through the blocks in each heap.
  3. Use HeapSize to get sizes and type of different blocks
like image 128
user93353 Avatar answered Oct 11 '22 14:10

user93353