Skip to content

Commit 59e5d91

Browse files
committed
Update
Signed-off-by: lhu <[email protected]>
1 parent cae00b2 commit 59e5d91

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

runtime/gc_base/IndexableObjectAllocationModel.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,8 @@ MM_IndexableObjectAllocationModel::getSparseAddressAndDecommitLeaves(MM_Environm
388388
reservedAddressLow = envBase->_objectAllocationInterface->allocateArrayletLeaf(
389389
envBase, &_allocateDescription, _allocateDescription.getMemorySpace(), true);
390390

391+
_allocateDescription.setSharedReserved(false);
392+
391393
/* If reservedRegion allocation failed set the result to NULL and return. */
392394
if (NULL == reservedAddressLow) {
393395
Trc_MM_allocateAndConnectNonContiguousArraylet_leafFailure(envBase->getLanguageVMThread());

runtime/gc_vlhgc/AllocationContextBalanced.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,10 @@ MM_AllocationContextBalanced::lockedAllocateArrayletLeaf(MM_EnvironmentBase *env
391391
* In future, allocations should remember (somewhere in Off-heap meta structures) how many regions came from each AC
392392
* \and release exact same number back to each AC.
393393
*/
394-
MM_AllocationContextTarok *context = this;
394+
MM_AllocationContextTarok *context = freeRegionForArrayletLeaf->_allocateData._owningContext;
395+
if (NULL != freeRegionForArrayletLeaf->_allocateData._originalOwningContext) {
396+
context = freeRegionForArrayletLeaf->_allocateData._originalOwningContext;
397+
}
395398
if (allocateDescription->getSharedReserved()) {
396399
context = (MM_AllocationContextTarok *)env->getCommonAllocationContext();
397400
}

runtime/gc_vlhgc/CopyForwardScheme.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4183,6 +4183,7 @@ class MM_CopyForwardSchemeRootClearer : public MM_RootScanner
41834183
MM_AllocationContextBalanced *context = NULL;
41844184
for (uintptr_t index = 0; index < reservedRegionCount; index++) {
41854185
context = (MM_AllocationContextBalanced *) largeObjectVirtualMemory->getAllocationContextForAddress(dataAddr, index);
4186+
Assert_MM_true(NULL != context);
41864187
context->recycleReservedRegionsForVirtualLargeObjectHeap(env, 1);
41874188
}
41884189

runtime/gc_vlhgc/GlobalMarkingScheme.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,6 +1437,7 @@ class MM_GlobalMarkingSchemeRootClearer : public MM_RootScanner
14371437
MM_AllocationContextBalanced *context = NULL;
14381438
for (uintptr_t index = 0; index < reservedRegionCount; index++) {
14391439
context = (MM_AllocationContextBalanced *) largeObjectVirtualMemory->getAllocationContextForAddress(dataAddr, index);
1440+
Assert_MM_true(NULL != context);
14401441
context->recycleReservedRegionsForVirtualLargeObjectHeap(env, 1);
14411442
}
14421443

0 commit comments

Comments
 (0)