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,
Heap Memory graph question
-
- Posts: 157
- Joined: Wed Aug 15, 2007 9:09 pm
Re: Heap Memory graph question
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
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