Home
last modified time | relevance | path

Searched refs:allocator_ (Results 1 – 25 of 42) sorted by relevance

12

/ark/runtime_core/runtime/mem/
Dallocator_adapter.h42 : allocator_(allocator) in allocator_() function
47 AllocatorAdapter(const AllocatorAdapter<U, AllocScopeT> &other) : allocator_(other.allocator_) in AllocatorAdapter()
55 allocator_ = other.allocator_; in AllocatorAdapter()
56 other.allocator_ = nullptr; in AllocatorAdapter()
61 allocator_ = other.allocator_;
62 other.allocator_ = nullptr;
69 Allocator *allocator_;
95 : allocator_(allocator) in allocator_() function
100 AllocatorAdapter(const AllocatorAdapter<U, AllocScopeT> &other) : allocator_(other.allocator_) in AllocatorAdapter()
108 allocator_ = other.allocator_; in AllocatorAdapter()
[all …]
Drunslots_allocator_stl_adapter.h42 …tsAllocatorAdapter(RunSlotsAllocator<AllocConfigT, LockConfigT> *allocator) : allocator_(allocator) in RunSlotsAllocatorAdapter()
48 : allocator_(other.allocator_) in RunSlotsAllocatorAdapter()
56 RunSlotsAllocator<AllocConfigT, LockConfigT> *allocator_;
81 explicit RunSlotsAllocatorAdapter(AllocConfigT *allocator) : allocator_(allocator) {} in RunSlotsAllocatorAdapter()
85 : allocator_(other.allocator_) in RunSlotsAllocatorAdapter()
92 allocator_ = other.allocator_; in RunSlotsAllocatorAdapter()
93 other.allocator_ = nullptr; in RunSlotsAllocatorAdapter()
97 allocator_ = other.allocator_;
98 other.allocator_ = nullptr;
126 return allocator_->template AllocArray<T>(n);
[all …]
Dregion_space.h312 …e_t region_size, InternalAllocatorPtr allocator) : region_size_(region_size), allocator_(allocator) in RegionBlock()
319 allocator_->Free(occupied_.Data()); in ~RegionBlock()
364 InternalAllocatorPtr allocator_; variable
379 …: block_(region_size, allocator), region_size_(region_size), allocator_(allocator), extend_(extend) in RegionPool()
416 return allocator_; in GetInternalAllocator()
435 InternalAllocatorPtr allocator_; variable
Drem_set-inl.h27 allocator_ = region->GetInternalAllocator(); in RemSet()
44 list = allocator_->New<CardList>(); in AddRef()
59 allocator_->Delete(list); in Clear()
/ark/runtime_core/runtime/tests/
Dinternal_allocator_test.cpp33 allocator_ = new InternalAllocatorT<InternalAllocatorConfig::PANDA_ALLOCATORS>(mem_stats_); in InternalAllocatorTest()
38 delete static_cast<Allocator *>(allocator_); in ~InternalAllocatorTest()
46 InternalAllocatorPtr allocator_ {nullptr}; member in panda::mem::test::InternalAllocatorTest
54 mem = allocator_->Alloc(alloc_size); in InfinitiveAllocate()
98 auto arr = allocator_->New<A[]>(COUNT); in TEST_F()
105 allocator_->DeleteArray(arr); in TEST_F()
111 ASSERT(allocator_->Alloc(0) == nullptr); in TEST_F()
117 void *mem = allocator_->Alloc(RunSlots<>::MaxSlotSize()); in TEST_F()
119 allocator_->Free(mem); in TEST_F()
122 mem = allocator_->Alloc(FreeListAllocator<EmptyMemoryConfig>::GetMaxSize()); in TEST_F()
[all …]
/ark/runtime_core/libpandabase/mem/
Darena_allocator_stl_adapter.h42 …explicit ArenaAllocatorAdapter(ArenaAllocatorT<use_oom_handler> *allocator) : allocator_(allocator… in ArenaAllocatorAdapter()
45 …catorAdapter(const ArenaAllocatorAdapter<U, use_oom_handler> &other) : allocator_(other.allocator_) in ArenaAllocatorAdapter()
55 ArenaAllocatorT<use_oom_handler> *allocator_;
80 …explicit ArenaAllocatorAdapter(ArenaAllocatorT<use_oom_handler> *allocator) : allocator_(allocator… in ArenaAllocatorAdapter()
83 …catorAdapter(const ArenaAllocatorAdapter<U, use_oom_handler> &other) : allocator_(other.allocator_) in ArenaAllocatorAdapter()
90 allocator_ = other.allocator_; in ArenaAllocatorAdapter()
91 other.allocator_ = nullptr; in ArenaAllocatorAdapter()
95 allocator_ = other.allocator_;
96 other.allocator_ = nullptr;
123 return allocator_->template AllocArray<T>(n); // CODECHECK-NOLINT(C_RULE_ID_HORIZON_SPACE)
[all …]
Darena_allocator.h213 : old_size_(arena_allocator->GetAllocatedSize()), allocator_(arena_allocator) in ArenaResizeWrapper()
219 allocator_->Resize(old_size_); in ~ArenaResizeWrapper()
224 ArenaAllocatorT<use_oom_handler> *allocator_; variable
/ark/js_runtime/ecmascript/mem/
Dsparse_space.cpp30 allocator_ = new FreeListAllocator(heap); in SparseSpace()
44 allocator_->Initialize(region); in Initialize()
49 allocator_->RebuildFreeList(); in Reset()
55 auto object = allocator_->Allocate(size); in Allocate()
69 object = allocator_->Allocate(size); in Allocate()
97 allocator_->AddFree(region); in Expand()
106 auto object = allocator_->Allocate(size); in AllocateAfterSweepingCompleted()
114 return allocator_->Allocate(size); in AllocateAfterSweepingCompleted()
129 allocator_->RebuildFreeList(); in PrepareSweeping()
149 allocator_->RebuildFreeList(); in Sweeping()
[all …]
Dlinear_space.cpp32 auto object = allocator_->Allocate(size); in Allocate()
40 object = allocator_->Allocate(size); in Allocate()
45 object = allocator_->Allocate(size); in Allocate()
57 uintptr_t top = allocator_->GetTop(); in Expand()
75 allocator_->Reset(region->GetBegin(), region->GetEnd()); in Expand()
84 GetCurrentRegion()->SetHighWaterMark(allocator_->GetTop()); in Stop()
91 allocator_ = new BumpPointerAllocator(); in SemiSpace()
99 allocator_->Reset(region->GetBegin(), region->GetEnd()); in Initialize()
136 waterLine_ = allocator_->GetTop(); in SetWaterLine()
201 auto top = allocator_->GetTop(); in IterateOverObjects()
Dchunk.cpp21 Chunk::Chunk(NativeAreaAllocator *allocator) : allocator_(allocator) {} in Chunk()
25 auto area = allocator_->AllocateArea(size); in NewArea()
75 allocator_->FreeArea(node); in ReleaseMemory()
Dparallel_work_helper.cpp112 if (holder.allocator_ != nullptr) { in Finish()
113 holder.allocator_->Finalize(); in Finish()
114 delete holder.allocator_; in Finish()
115 holder.allocator_ = nullptr; in Finish()
151 holder.allocator_ = new TlabAllocator(heap_); in Initialize()
Dlinear_space.h33 BumpPointerAllocator *allocator_;
63 return allocator_->GetTop(); in GetTop()
Dparallel_evacuation.cpp33 allocator_ = new TlabAllocator(heap_); in Initialize()
41 delete allocator_; in Finalize()
75 EvacuateSpace(allocator_, true); in EvacuateSpace()
412 allocator_ = new TlabAllocator(evacuation->heap_); in EvacuationTask()
417 delete allocator_; in ~EvacuationTask()
422 return evacuation_->EvacuateSpace(allocator_); in Run()
/ark/runtime_core/libpandabase/utils/
Dsmall_vector.h198 SmallVector() : allocator_(AddStaticFlag(Allocator::GetInstance())) in SmallVector()
204 explicit SmallVector(Allocator *allocator) : allocator_(AddStaticFlag(allocator)) in SmallVector()
210 SmallVector(const SmallVector &other) : allocator_(other.allocator_) in SmallVector()
221 SmallVector(SmallVector &&other) noexcept : allocator_(other.allocator_) in SmallVector()
246 allocator_ = other.allocator_;
261 allocator_ = other.allocator_;
457 return (bit_cast<uintptr_t>(allocator_) & 1U) != 0; in IsStatic()
478 allocator_ = reinterpret_cast<Allocator *>(bit_cast<uintptr_t>(allocator_) & ~1LLU); in MoveToVector()
479 VectorType tmp_vector(allocator_->Adapter()); in MoveToVector()
500 allocator_ = AddStaticFlag(allocator_); in ResetToStatic()
[all …]
/ark/runtime_core/runtime/
Dthread_pool.h51 : allocator_(allocator), in allocator_() function
53 workers_(allocator_->Adapter()), in allocator_()
54 procs_(allocator_->Adapter()), in allocator_()
56 is_thread_active_(allocator_->Adapter()) in allocator_()
95 allocator_->Delete(procs_.back()); in Scale()
227 allocator_->Delete(proc); in WaitForWorkers()
241 allocator_->Delete(worker); in REQUIRES()
253 auto proc = allocator_->New<Proc>(args_); in CreateNewThread()
255 auto worker = allocator_->New<std::thread>(WorkerEntry, this, proc, i); in CreateNewThread()
270 mem::InternalAllocatorPtr allocator_; variable
Dglobal_handle_storage.h35 explicit GlobalHandleStorage(InternalAllocatorPtr allocator) : allocator_(allocator) in GlobalHandleStorage()
37 ASSERT(allocator_ != nullptr); in GlobalHandleStorage()
38 …globalNodes_ = allocator_->New<PandaVector<std::array<Node, GLOBAL_BLOCK_SIZE> *>>(allocator_->Ada… in GlobalHandleStorage()
112 InternalAllocatorPtr allocator_; variable
Dhandle_storage.h39 explicit HandleStorage(InternalAllocatorPtr allocator) : allocator_(allocator) in HandleStorage()
41 ASSERT(allocator_ != nullptr); in HandleStorage()
46 allocator_->Delete(n); in ~HandleStorage()
75 InternalAllocatorPtr allocator_ {nullptr};
Dmonitor_pool.h56 allocator_->Delete(monitor); in DeflateMonitorsWithCallBack()
66 allocator_ = allocator; in MonitorPool()
73 allocator_->Delete(iter.second); in ~MonitorPool()
87 mem::InternalAllocatorPtr allocator_;
Dsignal_handler.h52 return allocator_; in GetAllocator()
57 explicit SignalManager(mem::InternalAllocatorPtr allocator) : allocator_(allocator) {} in SignalManager()
64 mem::InternalAllocatorPtr allocator_; variable
Dmonitor_pool.cpp34 auto monitor = pool->allocator_->New<Monitor>(pool->last_id_); in CreateMonitor()
63 pool->allocator_->Delete(monitor); in FreeMonitor()
73 allocator_->Delete(monitor); in DeflateMonitors()
Dsignal_handler.cpp193 allocator_->Delete(tmp); in InitSignals()
197 allocator_->Delete(tmp); in InitSignals()
222 allocator_->Delete(tmp); in DeleteHandlersArray()
226 allocator_->Delete(tmp); in DeleteHandlersArray()
Dglobal_handle_storage-inl.h31 allocator_->Delete(block); in ~GlobalHandleStorage()
33 allocator_->Delete(globalNodes_); in ~GlobalHandleStorage()
41 auto block = allocator_->New<std::array<Node, GLOBAL_BLOCK_SIZE>>(); in NewGlobalHandle()
/ark/js_runtime/ecmascript/
Decma_global_storage.h29 explicit EcmaGlobalStorage(NativeAreaAllocator *allocator) : allocator_(allocator) in EcmaGlobalStorage()
32 topGlobalNodes_ = lastGlobalNodes_ = allocator_->New<NodeList>(false); in EcmaGlobalStorage()
33 topWeakGlobalNodes_ = lastWeakGlobalNodes_ = allocator_->New<NodeList>(true); in EcmaGlobalStorage()
43 allocator_->Delete(current); in ~EcmaGlobalStorage()
50 allocator_->Delete(current); in ~EcmaGlobalStorage()
257 NativeAreaAllocator *allocator_ {nullptr};
/ark/runtime_core/runtime/mem/refstorage/
Dglobal_object_storage.cpp32 : allocator_(allocator) in GlobalObjectStorage()
40 allocator_->Delete(global_storage_); in ~GlobalObjectStorage()
41 allocator_->Delete(weak_storage_); in ~GlobalObjectStorage()
113 auto objects = PandaVector<ObjectHeader *>(allocator_->Adapter()); in GetAllObjects()
/ark/runtime_core/runtime/include/mem/
Dallocator.h427 : Allocator(mem_stats, allocatorPurpose, GCCollectMode::GC_NONE), allocator_(mem_stats) in AllocatorSingleT()
436 return allocator_.Alloc(size, align); in Allocate()
441 return allocator_.AllocLocal(size, align); in AllocateLocal()
453 allocator_.Free(mem); in Free()
458 allocator_.VisitAndRemoveAllPools(mem_visitor); in VisitAndRemoveAllPools()
463 allocator_.VisitAndRemoveFreePools(mem_visitor); in VisitAndRemoveFreePools()
480 allocator_.Dump(); in Dump()
485 AllocT allocator_;

12