8280001: Serial: Add documentation to heap memory layout

Reviewed-by: mli, sjohanss, tschatzl
This commit is contained in:
Albert Mingkun Yang 2022-01-17 08:56:40 +00:00
parent a30aa52b77
commit 431bd9a66d

@ -35,6 +35,26 @@ class MemoryPool;
class OopIterateClosure;
class TenuredGeneration;
// SerialHeap is the implementation of CollectedHeap for Serial GC.
//
// The heap is reserved up-front in a single contiguous block, split into two
// parts, the young and old generation. The young generation resides at lower
// addresses, the old generation at higher addresses. The boundary address
// between the generations is fixed. Within a generation, committed memory
// grows towards higher addresses.
//
//
// low high
//
// +-- generation boundary (fixed after startup)
// |
// |<- young gen (reserved MaxNewSize) ->|<- old gen (reserved MaxOldSize) ->|
// +-----------------+--------+--------+--------+---------------+-------------------+
// | eden | from | to | | old | |
// | | (to) | (from) | | | |
// +-----------------+--------+--------+--------+---------------+-------------------+
// |<- committed ->| |<- committed ->|
//
class SerialHeap : public GenCollectedHeap {
private:
MemoryPool* _eden_pool;