Home
last modified time | relevance | path

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

12345678

/arkcompiler/runtime_core/static_core/runtime/tests/
Dinternal_allocator_test.cpp33 allocator_ = new InternalAllocatorT<InternalAllocatorConfig::PANDA_ALLOCATORS>(memStats_); in InternalAllocatorTest()
38 delete static_cast<Allocator *>(allocator_); in ~InternalAllocatorTest()
49 InternalAllocatorPtr allocator_; member in panda::mem::test::InternalAllocatorTest
57 mem = allocator_->Alloc(allocSize); in InfinitiveAllocate()
111 auto arr = allocator_->New<A[]>(COUNT); in TEST_F()
119 allocator_->DeleteArray(arr); in TEST_F()
125 ASSERT(allocator_->Alloc(0) == nullptr); in TEST_F()
131 void *mem = allocator_->Alloc(RunSlots<>::MaxSlotSize()); in TEST_F()
133 allocator_->Free(mem); in TEST_F()
136 mem = allocator_->Alloc(FreeListAllocator<EmptyMemoryConfig>::GetMaxSize()); in TEST_F()
[all …]
/arkcompiler/ets_frontend/es2panda/typescript/core/
DtypeCreation.cpp28 auto *newNumLiteralType = allocator_->New<NumberLiteralType>(value); in CreateNumberLiteralType()
40 auto *newBigiLiteralType = allocator_->New<BigintLiteralType>(str, negative); in CreateBigintLiteralType()
52 auto *newStrLiteralType = allocator_->New<StringLiteralType>(str); in CreateStringLiteralType()
59 ArenaVector<Type *> newConstituentTypes(allocator_->Adapter()); in CreateUnionType()
70 ArenaVector<Type *> newConstituentTypes(allocator_->Adapter()); in CreateUnionType()
90 auto *newUnionType = allocator_->New<UnionType>(newConstituentTypes); in CreateUnionType()
101 ArenaVector<Type *> newConstituentTypes(allocator_->Adapter()); in CreateUnionType()
121 auto *newUnionType = allocator_->New<UnionType>(std::move(newConstituentTypes)); in CreateUnionType()
128 … auto *objType = allocator_->New<ObjectLiteralType>(allocator_->New<ObjectDescriptor>(allocator_)); in CreateObjectTypeWithCallSignature()
135 … auto *objType = allocator_->New<ObjectLiteralType>(allocator_->New<ObjectDescriptor>(allocator_)); in CreateObjectTypeWithConstructSignature()
[all …]
Dobject.cpp113 ObjectDescriptor *desc = allocator_->New<ObjectDescriptor>(allocator_); in ResolveUnionTypeMembers()
114 ArenaVector<Type *> stringInfoTypes(allocator_->Adapter()); in ResolveUnionTypeMembers()
115 ArenaVector<Type *> numberInfoTypes(allocator_->Adapter()); in ResolveUnionTypeMembers()
116 ArenaVector<Signature *> callSignatures(allocator_->Adapter()); in ResolveUnionTypeMembers()
117 ArenaVector<Signature *> constructSignatures(allocator_->Adapter()); in ResolveUnionTypeMembers()
152 …desc->stringIndexInfo = allocator_->New<IndexInfo>(CreateUnionType(std::move(stringInfoTypes)), "x… in ResolveUnionTypeMembers()
156 …desc->numberIndexInfo = allocator_->New<IndexInfo>(CreateUnionType(std::move(numberInfoTypes)), "x… in ResolveUnionTypeMembers()
159 ObjectType *mergedType = allocator_->New<ObjectLiteralType>(desc); in ResolveUnionTypeMembers()
184 ArenaVector<const ir::TSSignatureDeclaration *> signatureDeclarations(allocator_->Adapter()); in ResolveObjectTypeMembers()
185 ArenaVector<const ir::TSIndexSignature *> indexDeclarations(allocator_->Adapter()); in ResolveObjectTypeMembers()
[all …]
Dfunction.cpp82 ArenaVector<Type *> returnTypes(allocator_->Adapter()); in HandleFunctionReturn()
154 …TupleType *newTuple = inferedTuple->Instantiate(allocator_, relation_, globalTypes_)->AsObjectType… in CreateParameterTypeForArrayAssignmentPattern()
157 util::StringView memberIndex = util::Helpers::ToStringView(allocator_, index); in CreateParameterTypeForArrayAssignmentPattern()
159allocator_, memberIndex, binder::VariableFlags::PROPERTY | binder::VariableFlags::OPTIONAL, nullpt… in CreateParameterTypeForArrayAssignmentPattern()
174 …ObjectType *newObject = inferedType->Instantiate(allocator_, relation_, globalTypes_)->AsObjectTyp… in CreateParameterTypeForObjectAssignmentPattern()
196 binder::Scope::CreateVar(allocator_, prop->Key()->AsIdentifier()->Name(), in CreateParameterTypeForObjectAssignmentPattern()
248 util::UString pn(ss.str(), allocator_); in CheckFunctionAssignmentPatternParameter()
250 binder::Scope::CreateVar(allocator_, pn.View(), binder::VariableFlags::NONE, param); in CheckFunctionAssignmentPatternParameter()
278 Type *restType = allocator_->New<ArrayType>(GlobalAnyType()); in CheckFunctionRestParameter()
326 util::UString pn(ss.str(), allocator_); in CheckFunctionArrayPatternParameter()
[all …]
/arkcompiler/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);
[all …]
/arkcompiler/runtime_core/static_core/libpandabase/mem/
Darena_allocator_stl_adapter.h44 …explicit ArenaAllocatorAdapter(ArenaAllocatorT<USE_OOM_HANDLER> *allocator) : allocator_(allocator… in ArenaAllocatorAdapter()
47 …catorAdapter(const ArenaAllocatorAdapter<U, USE_OOM_HANDLER> &other) : allocator_(other.allocator_) in ArenaAllocatorAdapter()
57 ArenaAllocatorT<USE_OOM_HANDLER> *allocator_;
84 …explicit ArenaAllocatorAdapter(ArenaAllocatorT<USE_OOM_HANDLER> *allocator) : allocator_(allocator… in ArenaAllocatorAdapter()
87 …catorAdapter(const ArenaAllocatorAdapter<U, USE_OOM_HANDLER> &other) : allocator_(other.allocator_) in ArenaAllocatorAdapter()
94 allocator_ = other.allocator_; in ArenaAllocatorAdapter()
95 other.allocator_ = nullptr; in ArenaAllocatorAdapter()
99 allocator_ = other.allocator_;
100 other.allocator_ = nullptr;
127 return allocator_->template AllocArray<T>(n);
[all …]
/arkcompiler/runtime_core/static_core/runtime/mem/
Drunslots_allocator_stl_adapter.h46 …tsAllocatorAdapter(RunSlotsAllocator<AllocConfigT, LockConfigT> *allocator) : allocator_(allocator) in RunSlotsAllocatorAdapter()
52 : allocator_(other.allocator_) in RunSlotsAllocatorAdapter()
60 RunSlotsAllocator<AllocConfigT, LockConfigT> *allocator_;
94 explicit RunSlotsAllocatorAdapter(AllocConfigT *allocator) : allocator_(allocator) {} in RunSlotsAllocatorAdapter()
98 : allocator_(other.allocator_) in RunSlotsAllocatorAdapter()
105 allocator_ = other.allocator_; in RunSlotsAllocatorAdapter()
106 other.allocator_ = nullptr; in RunSlotsAllocatorAdapter()
110 allocator_ = other.allocator_;
111 other.allocator_ = nullptr;
140 return allocator_->template AllocArray<T>(n);
[all …]
Dallocator_adapter.h45 : allocator_(allocator) in allocator_() function
47 ASSERT(allocator_ != nullptr); in allocator_()
51 AllocatorAdapter(const AllocatorAdapter<U, ALLOC_SCOPE_T> &other) : allocator_(other.allocator_) in AllocatorAdapter()
63 Allocator *allocator_;
93 : allocator_(allocator) in allocator_() function
98 AllocatorAdapter(const AllocatorAdapter<U, ALLOC_SCOPE_T> &other) : allocator_(other.allocator_) in AllocatorAdapter()
114 return allocator_->AllocArray<T>(size);
117 return allocator_->AllocArrayLocal<T>(size);
124 allocator_->Free(ptr); in deallocate()
142 return this->allocator_ == other.allocator_;
[all …]
/arkcompiler/ets_runtime/ecmascript/mem/
Dsparse_space.cpp32 allocator_ = new FreeListAllocator(heap); in SparseSpace()
42 allocator_->Initialize(region); in Initialize()
47 allocator_->RebuildFreeList(); in Reset()
54 allocator_->ResetTopPointer(top); in ResetTopPointer()
59 auto object = allocator_->Allocate(size); in Allocate()
69 object = allocator_->Allocate(size); in Allocate()
74 object = allocator_->Allocate(size); in Allocate()
96 allocator_->AddFree(region); in Expand()
105 auto object = allocator_->Allocate(size); in AllocateAfterSweepingCompleted()
112 return allocator_->Allocate(size); in AllocateAfterSweepingCompleted()
[all …]
Dwork_space_chunk.cpp21 WorkSpaceChunk::WorkSpaceChunk(NativeAreaAllocator *allocator) : allocator_(allocator) {} in WorkSpaceChunk()
25 auto area = reinterpret_cast<uintptr_t>(allocator_->AllocateBuffer(size)); in NewArea()
30 allocator_->IncreaseNativeSizeStats(size, NativeFlag::CHUNK_MEM); in NewArea()
45 allocator_->FreeBuffer(mem); in Free()
54 allocator_->FreeBuffer(reinterpret_cast<void *>(iter->second)); in ReleaseMemory()
Dlinear_space.cpp34 auto object = allocator_.Allocate(size); in Allocate()
50 object = allocator_.Allocate(size); in Allocate()
64 object = allocator_.Allocate(size); in Allocate()
82 uintptr_t top = allocator_.GetTop(); in Expand()
99 allocator_.Reset(region->GetBegin(), region->GetEnd()); in Expand()
108 GetCurrentRegion()->SetHighWaterMark(allocator_.GetTop()); in Stop()
116allocator_.Reset(currentRegion->GetBegin(), currentRegion->GetEnd(), currentRegion->GetHighWaterMa… in ResetAllocator()
127 auto top = allocator_.GetTop(); in IterateOverObjects()
174 allocator_.Reset(region->GetBegin(), region->GetEnd()); in Initialize()
214 waterLine_ = allocator_.GetTop(); in SetWaterLine()
[all …]
Dchunk.cpp21 Chunk::Chunk(NativeAreaAllocator *allocator) : allocator_(allocator) {} in Chunk()
25 auto area = allocator_->AllocateArea(size); in NewArea()
30 allocator_->IncreaseNativeSizeStats(size, NativeFlag::CHUNK_MEM); in NewArea()
76 allocator_->FreeArea(node); in ReleaseMemory()
/arkcompiler/ets_frontend/es2panda/parser/program/
Dprogram.cpp24 : allocator_(std::make_unique<ArenaAllocator>(SpaceType::SPACE_TYPE_COMPILER, nullptr, true)), in Program()
25 binder_(allocator_->New<binder::Binder>(this, extension)), in Program()
33 : allocator_(std::move(other.allocator_)), in Program()
58 allocator_ = std::move(other.allocator_); in operator =()
79 moduleRecord_ = allocator_->New<SourceTextModuleRecord>(Allocator()); in SetKind()
80 typeModuleRecord_ = allocator_->New<SourceTextModuleRecord>(Allocator()); in SetKind()
/arkcompiler/ets_frontend/es2panda/parser/module/
DsourceTextModuleRecord.h33 : allocator_(allocator), in SourceTextModuleRecord()
34 moduleRequestsMap_(allocator_->Adapter()), in SourceTextModuleRecord()
35 moduleRequestsIdxMap_(allocator_->Adapter()), in SourceTextModuleRecord()
36 moduleRequests_(allocator_->Adapter()), in SourceTextModuleRecord()
37 localExportEntries_(allocator_->Adapter()), in SourceTextModuleRecord()
38 regularImportEntries_(allocator_->Adapter()), in SourceTextModuleRecord()
39 namespaceImportEntries_(allocator_->Adapter()), in SourceTextModuleRecord()
40 starExportEntries_(allocator_->Adapter()), in SourceTextModuleRecord()
41 indirectExportEntries_(allocator_->Adapter()) in SourceTextModuleRecord()
87 return allocator_->New<T>(std::forward<Args>(args)...); in NewEntry()
[all …]
/arkcompiler/runtime_core/static_core/runtime/
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()
116 allocator_->Delete(block); in FreeGlobalNodes()
121 InternalAllocatorPtr allocator_; variable
Dthread_pool.h98 : allocator_(allocator), in allocator_() function
100 workers_(allocator_->Adapter()), in allocator_()
101 procs_(allocator_->Adapter()), in allocator_()
103 isThreadActive_(allocator_->Adapter()), in allocator_()
143 allocator_->Delete(procs_.back()); in Scale()
164 auto *proc = allocator_->New<Proc>(args_); in Help()
192 allocator_->Delete(proc); in Help()
334 allocator_->Delete(proc); in WaitForWorkers()
348 allocator_->Delete(worker); in REQUIRES()
359 auto proc = allocator_->New<Proc>(args_); in CreateNewThread()
[all …]
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.h55 allocator_->Delete(monitor); in DeflateMonitorsWithCallBack()
65 allocator_ = allocator; in MonitorPool()
80 allocator_->Delete(iter.second); in ~MonitorPool()
103 mem::InternalAllocatorPtr allocator_;
/arkcompiler/ets_frontend/es2panda/util/
DsymbolTable.h42 allocator_(SpaceType::SPACE_TYPE_COMPILER, nullptr, true), in SymbolTable()
43 originFunctionInfo_(allocator_.Adapter()), in SymbolTable()
44 originModuleInfo_(allocator_.Adapter()), in SymbolTable()
45 originRecordHashFunctionNames_(allocator_.Adapter()) {} in SymbolTable()
73 ArenaAllocator allocator_; variable
DpatchFix.h50 allocator_(SpaceType::SPACE_TYPE_COMPILER, nullptr, true), in PatchFix()
51 topScopeLexEnvs_(allocator_.Adapter()), in PatchFix()
52 patchFuncNames_(allocator_.Adapter()), in PatchFix()
53 newFuncNames_(allocator_.Adapter()), in PatchFix()
54 funcDefineIns_(allocator_.Adapter()), in PatchFix()
55 modifiedClassNames_(allocator_.Adapter()), in PatchFix()
56 classMemberFunctions_(allocator_.Adapter()), in PatchFix()
57 funcDefinedClasses_(allocator_.Adapter()) { in PatchFix()
126 ArenaAllocator allocator_; variable
/arkcompiler/runtime_core/static_core/runtime/mem/gc/dynamic/
Dgc_dynamic_data.h25 explicit GCDynamicData(InternalAllocatorPtr a) : allocator_(a) in GCDynamicData()
36 allocator_->Delete(dynWeakReferences_); in ~GCDynamicData()
46 InternalAllocatorPtr allocator_; variable
/arkcompiler/runtime_core/libpandabase/utils/
Dsmall_vector.h226 explicit SmallVector(Allocator *allocator) : allocator_(AddStaticFlag(allocator)) in SmallVector()
235 SmallVector(const SmallVector &other) : allocator_(other.allocator_) in SmallVector()
251 SmallVector(SmallVector &&other) noexcept : allocator_(other.allocator_) in SmallVector()
281 allocator_ = other.allocator_;
301 allocator_ = other.allocator_;
548 return (bit_cast<uintptr_t>(allocator_) & 1U) != 0; in IsStatic()
578 allocator_ = reinterpret_cast<Allocator *>(bit_cast<uintptr_t>(allocator_) & ~1LLU); in MoveToVector()
581 ASSERT(allocator_ != nullptr); in MoveToVector()
582 VectorType tmp_vector(allocator_->Adapter()); in MoveToVector()
610 allocator_ = AddStaticFlag(allocator_); in ResetToStatic()
[all …]
/arkcompiler/runtime_core/static_core/libpandabase/utils/
Dsmall_vector.h229 explicit SmallVector(Allocator *allocator) : allocator_(AddStaticFlag(allocator)) in SmallVector()
238 SmallVector(const SmallVector &other) : allocator_(other.allocator_) in SmallVector()
254 SmallVector(SmallVector &&other) noexcept : allocator_(other.allocator_) in SmallVector()
284 allocator_ = other.allocator_;
304 allocator_ = other.allocator_;
564 return (bit_cast<uintptr_t>(allocator_) & 1U) != 0; in IsStatic()
594 allocator_ = reinterpret_cast<Allocator *>(bit_cast<uintptr_t>(allocator_) & ~1LLU); in MoveToVector()
597 ASSERT(allocator_ != nullptr); in MoveToVector()
598 VectorType tmpVector(allocator_->Adapter()); in MoveToVector()
626 allocator_ = AddStaticFlag(allocator_); in ResetToStatic()
[all …]
/arkcompiler/runtime_core/static_core/compiler/tests/
Dencoders_test.cpp33 allocator_ = new ArenaAllocator(SpaceType::SPACE_TYPE_COMPILER); in EncoderArm64VixlTest()
34 …encoder_ = static_cast<aarch64::Aarch64Encoder *>(Encoder::Create(allocator_, Arch::AARCH64, false… in EncoderArm64VixlTest()
36 encoder_->SetRegfile(RegistersDescription::Create(allocator_, Arch::AARCH64)); in EncoderArm64VixlTest()
38 execModule_ = allocator_->New<VixlExecModule>(allocator_, nullptr); in EncoderArm64VixlTest()
46 delete allocator_; in ~EncoderArm64VixlTest()
61 return allocator_; in GetAllocator()
193 ArenaAllocator *allocator_ {nullptr}; member in panda::compiler::tests::EncoderArm64VixlTest
/arkcompiler/runtime_core/compiler/tests/
Dencoders_test.cpp31 allocator_ = new ArenaAllocator(SpaceType::SPACE_TYPE_COMPILER); in EncoderArm64VixlTest()
32 …encoder_ = static_cast<aarch64::Aarch64Encoder *>(Encoder::Create(allocator_, Arch::AARCH64, false… in EncoderArm64VixlTest()
34 encoder_->SetRegfile(RegistersDescription::Create(allocator_, Arch::AARCH64)); in EncoderArm64VixlTest()
36 exec_module_ = allocator_->New<VixlExecModule>(allocator_, nullptr); in EncoderArm64VixlTest()
44 delete allocator_; in ~EncoderArm64VixlTest()
56 return allocator_; in GetAllocator()
189 ArenaAllocator *allocator_ {nullptr}; member in panda::compiler::tests::EncoderArm64VixlTest

12345678