mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-06 23:54:03 +00:00
!9568 修复触发ConcurrentMark后立刻触发GC
Merge pull request !9568 from chentianyu/cherry-pick-1707377460
This commit is contained in:
commit
0bab4907f1
@ -60,8 +60,9 @@ uintptr_t LinearSpace::Allocate(size_t size, bool isPromoted)
|
||||
} else {
|
||||
size_t stepOverShootSize = localHeap_->GetEcmaParamConfiguration().GetSemiSpaceStepOvershootSize();
|
||||
size_t maxOverShootSize = std::max(initialCapacity_ / 2, stepOverShootSize); // 2: half
|
||||
if (overShootSize_ < maxOverShootSize) {
|
||||
if (overShootSizeForConcurrentMark_ < maxOverShootSize) {
|
||||
overShootSize_ += stepOverShootSize;
|
||||
overShootSizeForConcurrentMark_ += stepOverShootSize;
|
||||
}
|
||||
}
|
||||
|
||||
@ -354,6 +355,7 @@ void SemiSpace::Initialize()
|
||||
void SemiSpace::Restart(size_t overShootSize)
|
||||
{
|
||||
overShootSize_ = overShootSize;
|
||||
overShootSizeForConcurrentMark_ = 0;
|
||||
survivalObjectSize_ = 0;
|
||||
allocateAfterLastGC_ = 0;
|
||||
Initialize();
|
||||
|
@ -67,6 +67,7 @@ protected:
|
||||
JSThread *thread_ {nullptr};
|
||||
BumpPointerAllocator allocator_;
|
||||
size_t overShootSize_ {0};
|
||||
size_t overShootSizeForConcurrentMark_ {0};
|
||||
size_t allocateAfterLastGC_ {0};
|
||||
size_t survivalObjectSize_ {0};
|
||||
uintptr_t waterLine_ {0};
|
||||
|
Loading…
Reference in New Issue
Block a user