You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allocate RS Control Blocks for Balanced as virtual memory
Currently, all Control Blocks (kind of a header structure) for
Remembered Set Buffers, for all possible regions, are allocated upfront
with one big malloc. This is suboptimal from footprint perspective.
Also, in extreme cases with very large heaps the allocation may not even
succeed.
We will now allocate that space as Virtual Memory which will be lazily
committed as needed (as regions are first time used and their RSCL is
first time initialized).
RS Buffers themselves are already allocated incrementally/gradually, as
regions are first time used, although still malloced. In future, we may
want to allocate them as virtual memory too, but currently that is less
important (relative to Control Blocks) due to their incremental
allocation.
Signed-off-by: Aleksandar Micic <Aleksandar_Micic@ca.ibm.com>
Copy file name to clipboardExpand all lines: runtime/gc_vlhgc/InterRegionRememberedSet.hpp
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,8 @@ class MM_InterRegionRememberedSet : public MM_BaseVirtual
57
57
public:
58
58
MM_HeapRegionManager *_heapRegionManager; /**< cached pointer to heap region manager */
59
59
60
+
MM_MemoryHandle _rsclBufferControlBlockPoolMemoryHandle; /**< memory handle for Control Blocks (but not Buffers) backing store */
61
+
60
62
MM_CardBufferControlBlock *_rsclBufferControlBlockPool; /**< starting address of the global pool of control blocks (kept around to be able to release memory at the end) */
61
63
MM_CardBufferControlBlock * volatile _rsclBufferControlBlockHead; /**< current head of BufferControlBlock global pool list */
62
64
volatile UDATA _freeBufferCount; /**< current count of Buffers in the global free pool */
@@ -69,7 +71,7 @@ class MM_InterRegionRememberedSet : public MM_BaseVirtual
69
71
70
72
UDATA _regionSize; /**< Cached region size */
71
73
72
-
bool _shouldFlushBuffersForDecommitedRegions; /**< set to true at the end of a GC, if contraction occured. this is a signal for the next GC to perform flush buffers from regions contracted */
74
+
bool _shouldFlushBuffersForDecommitedRegions; /**< set to true at the end of a GC, if contraction occurred. this is a signal for the next GC to perform flush buffers from regions contracted */
73
75
74
76
volatile UDATA _overflowedRegionCount; /**< count of regions overflowed as full */
75
77
UDATA _stableRegionCount; /**< count of regions overflowed as stable */
0 commit comments