mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-27 12:10:47 +00:00
Fix shared obj size in deserialize
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/IAH6UD Signed-off-by: chentianyu <chentianyu31@huawei.com> Change-Id: I9f8fee6cee453fbba76b450c19ea5a4b035512cc
This commit is contained in:
parent
7cf3dcb977
commit
24eccbc65d
@ -614,6 +614,7 @@ Region *BaseDeserializer::AllocateMultiSharedRegion(SharedSparseSpace *space, si
|
||||
} else {
|
||||
region->SetHighWaterMark(region->GetEnd() - regionRemainSizeVector[regionRemainSizeIndex_++]);
|
||||
}
|
||||
region->IncreaseAliveObject(region->GetAllocatedBytes());
|
||||
regionVector_.push_back(region);
|
||||
allocateRegions.push_back(region);
|
||||
regionNum--;
|
||||
@ -681,6 +682,10 @@ void BaseDeserializer::AllocateToSharedOldSpace(size_t sOldSpaceSize)
|
||||
Region *region = AllocateMultiSharedRegion(space, sOldSpaceSize, sOldRegionIndex_);
|
||||
sOldSpaceBeginAddr_ = region->GetBegin();
|
||||
} else {
|
||||
if (thread_->IsSharedConcurrentMarkingOrFinished()) {
|
||||
Region *region = Region::ObjectAddressToRange(object);
|
||||
region->IncreaseAliveObject(sOldSpaceSize);
|
||||
}
|
||||
FreeObject::FillFreeObject(sheap_, object, sOldSpaceSize);
|
||||
sOldSpaceBeginAddr_ = object;
|
||||
}
|
||||
@ -694,6 +699,10 @@ void BaseDeserializer::AllocateToSharedNonMovableSpace(size_t sNonMovableSpaceSi
|
||||
Region *region = AllocateMultiSharedRegion(space, sNonMovableSpaceSize, sNonMovableRegionIndex_);
|
||||
sNonMovableSpaceBeginAddr_ = region->GetBegin();
|
||||
} else {
|
||||
if (thread_->IsSharedConcurrentMarkingOrFinished()) {
|
||||
Region *region = Region::ObjectAddressToRange(object);
|
||||
region->IncreaseAliveObject(sNonMovableSpaceSize);
|
||||
}
|
||||
FreeObject::FillFreeObject(sheap_, object, sNonMovableSpaceSize);
|
||||
sNonMovableSpaceBeginAddr_ = object;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user