The Java heap is divided into regions known as generations, e.g. new generation, which may be further divided, e.g. eden space. Using the -XX:+PrintHeapAtGC
JVM option, three memory addresses for each heap region are printed in the GC logs in the form [A, B, C)
, where A
, B
and C
are memory addresses, e.g.:
eden space 838912K, 100% used [0x000000073ae00000, 0x000000076e140000, 0x000000076e140000)
What is the meaning of these memory addresses?
I have searched the web but am unable to find any explanation of this part of the GC logs.
A (bottom)
- lower address of the reserved memory region;B (top)
- current pointer to the top of the allocated area;C (end)
- upper bound of the reserved memory region.
Here are the relevant references to the source code.
space.hpp:
// Size computations: sizes in bytes.
size_t capacity() const { return byte_size(bottom(), end()); }
size_t used() const { return byte_size(bottom(), top()); }
size_t free() const { return byte_size(top(), end()); }
space.cpp:
void ContiguousSpace::print_on(outputStream* st) const {
print_short_on(st);
st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " INTPTR_FORMAT ")",
bottom(), top(), end());
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With