Lines Matching refs:heap
42 auto heap = const_cast<Heap *>(thread->GetEcmaVM()->GetHeap());
43 heap->GetConcurrentMarker()->EnableConcurrentMarking(EnableConcurrentMarkType::ENABLE);
44 heap->GetSweeper()->EnableConcurrentSweep(EnableConcurrentSweepType::ENABLE);
50 auto heap = const_cast<Heap *>(thread->GetEcmaVM()->GetHeap());
52 heap->GetConcurrentMarker()->ConfigConcurrentMark(false);
53 size_t oldNativeSize = heap->GetNativeBindingSize();
54 EcmaTestCommon::GcCommonCase(thread, heap, false);
56 auto newNativeSize = heap->GetNativeBindingSize();
62 auto heap = const_cast<Heap *>(thread->GetEcmaVM()->GetHeap());
64 heap->GetConcurrentMarker()->ConfigConcurrentMark(false);
65 size_t oldNativeSize = heap->GetNativeBindingSize();
66 EcmaTestCommon::GcCommonCase(thread, heap);
68 auto newNativeSize = heap->GetNativeBindingSize();
96 auto heap = const_cast<Heap *>(thread->GetEcmaVM()->GetHeap());
97 size_t originalHeapSize = heap->GetCommittedSize();
98 heap->GetConcurrentMarker()->ConfigConcurrentMark(false);
99 heap->NotifyPostFork();
100 heap->NotifyFinishColdStartSoon();
117 auto heap = const_cast<Heap *>(thread->GetEcmaVM()->GetHeap());
118 size_t originalHeapSize = heap->GetCommittedSize();
119 heap->GetConcurrentMarker()->ConfigConcurrentMark(false);
120 heap->NotifyHighSensitive(true);
137 auto heap = const_cast<Heap *>(thread->GetEcmaVM()->GetHeap());
138 heap->NotifyHighSensitive(true);
139 // First allocate about 250M TaggedArray, not reach max heap size
147 // Continue allocate about 250M TaggedArray, now reach max heap size, must trigger gc to avoid OOM
162 auto heap = const_cast<Heap *>(thread->GetEcmaVM()->GetHeap());
163 heap->NotifyPostFork();
164 heap->NotifyHighSensitive(true);
172 EXPECT_FALSE(heap->HandleExitHighSensitiveEvent());
173 heap->NotifyHighSensitive(false);
174 EXPECT_FALSE(heap->HandleExitHighSensitiveEvent());
175 heap->FinishStartupEvent();
177 heap->NotifyHighSensitive(true);
178 heap->NotifyHighSensitive(false);
179 EXPECT_TRUE(heap->HandleExitHighSensitiveEvent());
185 Heap *heap = const_cast<Heap *>(vm->GetHeap());
202 size_t number = heap->concurrentNativePointerList_.size();
204 heap->CollectGarbage(TriggerGCType::OLD_GC);
205 size_t newNumber = heap->concurrentNativePointerList_.size();
211 auto heap = const_cast<Heap *>(thread->GetEcmaVM()->GetHeap());
212 auto oldCapacity = heap->GetOldSpace()->GetInitialCapacity();
213 heap->CollectGarbage(TriggerGCType::FULL_GC);
214 EXPECT_FALSE(heap->IsConcurrentFullMark());
215 EXPECT_FALSE(heap->IsFullMarkRequested());
216 auto newCapacity = heap->GetOldSpace()->GetInitialCapacity();
218 double gcSpeed = heap->GetMemController()->CalculateMarkCompactSpeedPerMS();
219 double mutatorSpeed = heap->GetMemController()->GetCurrentOldSpaceAllocationThroughputPerMS();
220 size_t oldSpaceSize = heap->GetOldSpace()->GetHeapObjectSize() + heap->GetHugeObjectSpace()->GetHeapObjectSize() +
221 heap->GetHugeMachineCodeSpace()->GetHeapObjectSize();
222 size_t newSpaceCapacity = heap->GetNewSpace()->GetInitialCapacity();
223 double growingFactor = heap->GetMemController()->CalculateGrowingFactor(gcSpeed, mutatorSpeed);
224 size_t maxOldSpaceCapacity = heap->GetOldSpace()->GetMaximumCapacity() - newSpaceCapacity;
225 auto newOldSpaceLimit = heap->GetMemController()->CalculateAllocLimit(oldSpaceSize, MIN_OLD_SPACE_LIMIT,
232 auto heap = const_cast<Heap *>(thread->GetEcmaVM()->GetHeap());
233 auto ret = heap->GlobalNativeSizeLargerThanLimit();
235 heap->GetNativeAreaAllocator()->IncreaseNativeMemoryUsage(300*1000*1000);
236 ret = heap->GlobalNativeSizeLargerThanLimit();
242 auto heap = const_cast<Heap *>(thread->GetEcmaVM()->GetHeap());
243 auto idleGCTrigger = heap->GetIdleGCTrigger();
245 heap->CollectGarbage(TriggerGCType::FULL_GC);
246 int baseLocalGCCount = heap->GetEcmaGCStats()->GetGCCount();
248 heap->GetConcurrentMarker()->ConfigConcurrentMark(false);
270 int afterLocalGCCount = heap->GetEcmaGCStats()->GetGCCount();
274 heap->CollectGarbage(TriggerGCType::FULL_GC);
281 auto heap = const_cast<Heap *>(thread->GetEcmaVM()->GetHeap());
282 SemiSpace * space = heap->GetNewSpace();
310 auto heap = const_cast<Heap *>(thread->GetEcmaVM()->GetHeap());
312 heap->NotifyHighSensitive(true);
317 EXPECT_TRUE(heap->GetGlobalNativeSize() < 1 * 1024 * 1024* 1024); // 1GB