Heap Memory graph question

Questions about YourKit Java Profiler
Post Reply
limejuice
Posts: 120
Joined: Mon Sep 25, 2006 5:17 pm

Heap Memory graph question

Post by limejuice »

Hi,

When I am looking at Heap Memory graph, the numbers don't add up.
It says I have Old Gen 1.3 GB, Eden Space 690 MB, and Surivor Space 14 MB. That adds up to 2004 MB.

But Yourkit says Allocated All Pools is 2.6 GB.

Do you know why there is difference?

Thanks,

Image
Anton Katilin (YourKit)
Posts: 157
Joined: Wed Aug 15, 2007 9:09 pm

Re: Heap Memory graph question

Post by Anton Katilin (YourKit) »

Hi,

They shouldn't add up. 2.6 GB is memory allocated by all pools, 2004 MB is the part of that memory which is actually used. The difference between the numbers is the free memory in all pools.

Each pool occupies some virtual memory. It is the pool's Allocated memory. Only a part of the allocated memory is actually used, the rest is free. The garbage collector decides whether and when to shrink or expand the allocated memory; it does not immediately change the allocated memory size as soon as the used memory drops or grows.

When "Memory pool" combobox selection is "All Pools", it shows:

- Sum of all pools' allocated memory
- Each pool's used memory

To see allocated memory for particular pool, please select the pool via "Memory pool" combobox.

Best regards,
Anton
Post Reply