Heap memory vs object memory
According to a paper about Java memory and characteristics:
"... The memory score partitions into two types: heap memory, which is the
memory consumed by the application during runtime, and object memory,
which is the memory allocated by various objects used in the program, such
as integers and strings, etc. ..."
Do they mean the stack memory when they say object memory, or what do they
mean? (confused since, if I am not wrong, objects are allocated in the
heap in Java)
Second question, if I simply want to measure the total size of the heap
and stack during a full program execution, what tool should I use? I have
been looking around and tried out the built-in Java Profiler in NetBeans
7.3.1 and also YourKit 12.0.6, where I am able to inspect the heap but
when it comes to studying "objects" and variables placed on the stack, I
can not find a way!
To sum up, how do I measure what the paper is describing:
Total heap memory used
Total object memory used
Thanks!
No comments:
Post a Comment