/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_util/include/utils/ |
H A D | ref_vector.h | 55 template <typename T, typename Alloc = std::allocator<T>> 57 using base_vector = std::vector<T *, Alloc>; 61 using allocator_type = Alloc; 319 template <typename T, typename Alloc> 320 inline bool operator==(const ref_vector<T, Alloc> &lhs, const ref_vector<T, Alloc> &rhs) in operator ==() 325 template <typename T, typename Alloc> 326 inline bool operator!=(const ref_vector<T, Alloc> &lhs, const ref_vector<T, Alloc> &rhs) in operator !=() 331 template <typename T, typename Alloc> [all...] |
/arkcompiler/runtime_core/static_core/runtime/tests/ |
H A D | frame_allocator_test.cpp | 56 array[i] = alloc.Alloc(FRAME_SIZE); in SmallAllocateTest() 75 void *mem = alloc1.Alloc(FIRST_FRAME_SIZE); in CornerAllocationSizeTest() 79 mem = alloc1.Alloc(SECOND_FRAME_SIZE); in CornerAllocationSizeTest() 83 void *mem = alloc2.Alloc(SECOND_FRAME_SIZE); in CornerAllocationSizeTest() 87 mem = alloc2.Alloc(THIRD_FRAME_SIZE); in CornerAllocationSizeTest() 91 void *mem = alloc3.Alloc(THIRD_FRAME_SIZE); in CornerAllocationSizeTest() 95 mem = alloc3.Alloc(THIRD_FRAME_SIZE); in CornerAllocationSizeTest() 98 ASSERT_NE(alloc1.Alloc(FIRST_FRAME_SIZE), nullptr); in CornerAllocationSizeTest() 99 ASSERT_NE(alloc2.Alloc(SECOND_FRAME_SIZE), nullptr); in CornerAllocationSizeTest() 100 ASSERT_NE(alloc3.Alloc(THIRD_FRAME_SIZ in CornerAllocationSizeTest() [all...] |
H A D | region_allocator_test.cpp | 122 void *mem = allocator.Alloc<ALLOC_TYPE>(OBJECT_SIZE); in AllocateObjectWithClass() 136 ASSERT_TRUE(allocator.Alloc(size) != nullptr) in AllocateRegularObject() 140 ASSERT_TRUE(allocator.Alloc(size) != nullptr); in AllocateRegularObject() 144 ASSERT_TRUE(allocator.Alloc(alignSize) == nullptr); in AllocateRegularObject() 147 ASSERT_TRUE(allocator.Alloc(alignSize) != nullptr); in AllocateRegularObject() 160 ASSERT_TRUE(allocator.Alloc(allocSize) == nullptr); in AllocateLargeObject() 163 ASSERT_TRUE(allocator.Alloc(allocSize) != nullptr); in AllocateLargeObject() 194 ASSERT_TRUE(allocator.Alloc(allocator.GetMaxRegularObjectSize() / 2UL + 1UL) != nullptr); in TEST_F() 197 ASSERT_TRUE(allocator.Alloc(allocator.GetMaxRegularObjectSize() / 2UL + 1UL) == nullptr); in TEST_F() 212 ASSERT_TRUE(allocator.Alloc( in TEST_F() [all...] |
H A D | freelist_allocator_test.cpp | 124 void *mem = allocator.Alloc(i); in TEST_F() 205 void *mem = allocator.Alloc(MIN_ALLOC_SIZE); in TEST_F() 220 void *mem = allocator.Alloc(MIN_ALLOC_SIZE * 2U); in TEST_F() 227 void *mem = allocator.Alloc(MIN_ALLOC_SIZE); in TEST_F() 262 void *mem = allocator.Alloc(ALLOC_SIZE); in TEST_F() 297 void *firstAllocMem = allocator.Alloc(firstAllocSize); in TEST_F() 302 void *mem = allocator.Alloc(allocSize); in TEST_F() 318 firstAllocMem = allocator.Alloc(firstAllocSize); in TEST_F() 323 void *mem = allocator.Alloc(allocSize); in TEST_F() 425 auto *ptr1 = allocator.Alloc(167 in TEST_F() [all...] |
H A D | mem_leak_test.cpp | 43 auto ptr = allocator->Alloc(4); in TEST_F() 57 auto ptr = allocator->Alloc(1_KB); in TEST_F() 71 auto ptr = allocator->Alloc(1_MB); in TEST_F()
|
H A D | bump_allocator_test.cpp | 77 elements[i] = static_cast<AllocType *>(allocator.Alloc(sizeof(AllocType))); in AllocInCommonBuffer() 87 elements[i] = static_cast<AllocType *>(tlab->Alloc(sizeof(AllocType))); in AllocInTLAB() 129 arr[i] = static_cast<int *>(bpAllocator.Alloc(sizeof(int), align)); in DEATH_TEST_F() 147 EXPECT_DEATH_IF_SUPPORTED(ptr = bpAllocator.Alloc(sizeof(int), LOG_ALIGN_MAX), "alignment == DEFAULT_ALIGNMENT") in DEATH_TEST_F() 150 ptr = bpAllocator.Alloc(1_MB); in DEATH_TEST_F() 151 ASSERT_EQ(ptr, nullptr) << "Here Alloc with allocation size = 1 MB should return nullptr" in DEATH_TEST_F() 177 ASSERT_TRUE(allocator.Alloc(sizeof(AllocType)) == nullptr); in TEST_F() 178 ASSERT_TRUE(tlab->Alloc(sizeof(AllocType)) == nullptr); in TEST_F() 190 ASSERT_TRUE(allocator.Alloc(sizeof(AllocType)) == nullptr); in TEST_F() 191 ASSERT_TRUE(tlab->Alloc(sizeo in TEST_F() [all...] |
H A D | runslots_allocator_test.cpp | 124 void *mem = allocator.Alloc(i); in TEST_F() 140 void *mem = allocator.Alloc(ALLOC_SIZE); in TEST_F() 160 void *mem = allocator.Alloc(ALLOC_SIZE); in TEST_F() 250 char *strA = reinterpret_cast<char *>(allocator.Alloc(SIZE1)); in TEST_F() 251 char *strB = reinterpret_cast<char *>(allocator.Alloc(SIZE1)); in TEST_F() 252 char *strC = reinterpret_cast<char *>(allocator.Alloc(SIZE1)); in TEST_F() 262 char *strD = reinterpret_cast<char *>(allocator.Alloc(SIZE2)); in TEST_F() 263 char *strE = reinterpret_cast<char *>(allocator.Alloc(SIZE2)); in TEST_F() 264 char *strF = reinterpret_cast<char *>(allocator.Alloc(SIZE2)); in TEST_F() 313 // Alloc on in TEST_F() [all...] |
H A D | internal_allocator_test.cpp | 57 mem = allocator_->Alloc(allocSize); in InfinitiveAllocate() 125 ASSERT(allocator_->Alloc(0) == nullptr); in TEST_F() 131 void *mem = allocator_->Alloc(RunSlots<>::MaxSlotSize()); in TEST_F() 136 mem = allocator_->Alloc(FreeListAllocator<EmptyMemoryConfig>::GetMaxSize()); in TEST_F() 141 mem = allocator_->Alloc(FreeListAllocator<EmptyMemoryConfig>::GetMaxSize() + 1); in TEST_F() 158 auto *ptr = allocator_->Alloc(N); in TEST_F()
|
H A D | rem_set_test.cpp | 96 auto obj1 = static_cast<ObjectHeader *>(allocator.Alloc(allocator.GetMaxRegularObjectSize())); in TEST_F() 100 auto obj2 = static_cast<ObjectHeader *>(allocator.Alloc(allocator.GetMaxRegularObjectSize())); in TEST_F() 130 auto obj1 = static_cast<ObjectHeader *>(allocator.Alloc(allocator.GetMaxRegularObjectSize())); in TEST_F() 134 auto obj2 = static_cast<ObjectHeader *>(allocator.Alloc(allocator.GetMaxRegularObjectSize())); in TEST_F() 165 auto obj1 = static_cast<ObjectHeader *>(allocator.Alloc(allocator.GetMaxRegularObjectSize())); in TEST_F() 169 auto obj2 = static_cast<ObjectHeader *>(allocator.Alloc(allocator.GetMaxRegularObjectSize())); in TEST_F()
|
H A D | stack_like_allocator_test.cpp | 93 array[i] = alloc.Alloc(FRAME_SIZE); in TEST_F() 109 array[i] = alloc.Alloc(i * GetAlignmentInBytes(ALIGNMENT)); in AlignmentTest() 151 void *mem = alloc.Alloc(FRAME_SIZE); in TEST_F() 184 void *addr1Inside = alloc.Alloc(FRAME_SIZE); in TEST_F() 192 addr1Inside = alloc.Alloc(FRAME_SIZE); in TEST_F() 194 auto *addr2Inside = alloc.Alloc(FRAME_SIZE * 2); in TEST_F()
|
H A D | tlab_test.cpp | 82 void *mem = tlab->Alloc(AlignUp(ALLOC_SIZE, DEFAULT_ALIGNMENT_IN_BYTES)); in TEST_F() 105 arr[i] = static_cast<int *>(tlab->Alloc(sizeof(int))); 120 void *ptr = tlab->Alloc(TLAB_TEST_SIZE); 121 ASSERT_EQ(ptr, nullptr) << "Here Alloc with allocation size = " << TLAB_TEST_SIZE << " bytes should return nullptr";
|
H A D | malloc-proxy-allocator-test.cpp | 62 void *a1 = allocator.Alloc(SIZE); in TEST_F() 89 auto *mem = allocator.Alloc(i); in TEST_F()
|
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/ets/topLevelStmts/ |
H A D | globalClassHandler.cpp | 107 auto ident = NodeAllocator::Alloc<ir::Identifier>(allocator_, name, allocator_); in CreateGlobalMethod() 111 auto *func = NodeAllocator::Alloc<ir::ScriptFunction>( in CreateGlobalMethod() 119 auto *funcExpr = NodeAllocator::Alloc<ir::FunctionExpression>(allocator_, func); in CreateGlobalMethod() 120 return NodeAllocator::Alloc<ir::MethodDefinition>(allocator_, ir::MethodDefinitionKind::METHOD, in CreateGlobalMethod() 137 auto *const callExpr = NodeAllocator::Alloc<ir::CallExpression>( in AddInitCallFromStaticBlock() 141 auto exprStmt = NodeAllocator::Alloc<ir::ExpressionStatement>(allocator_, callExpr); in AddInitCallFromStaticBlock() 148 auto *const callee = NodeAllocator::Alloc<ir::Identifier>(allocator_, name, allocator_); in RefIdent() 267 auto *id = NodeAllocator::Alloc<ir::Identifier>(allocator_, compiler::Signatures::CCTOR, allocator_); in CreateStaticBlock() 271 auto *body = NodeAllocator::Alloc<ir::BlockStatement>(allocator_, allocator_, std::move(statements)); in CreateStaticBlock() 272 auto *func = NodeAllocator::Alloc<i in CreateStaticBlock() [all...] |
/arkcompiler/runtime_core/static_core/runtime/mem/ |
H A D | internal_allocator.cpp | 65 [[nodiscard]] void *InternalAllocator<CONFIG>::Alloc(size_t size, Alignment align) in Alloc() function in ark::mem::InternalAllocator 80 res = mallocAllocator_->Alloc(size, align); in Alloc() 143 void *res = runslotsAllocator->Alloc(size, align); in AllocInRunSlots() 149 res = runslotsAllocator->Alloc(size, align); in AllocInRunSlots() 188 void *res = freelistAllocator_->Alloc(size, align); in AllocViaFreeListAllocator() 196 res = freelistAllocator_->Alloc(size, align); in AllocViaFreeListAllocator() 216 void *res = humongousAllocator_->Alloc(size, align); in AllocViaHumongousAllocator() 224 res = humongousAllocator_->Alloc(size, align); in AllocViaHumongousAllocator() 360 template void *InternalAllocator<InternalAllocatorConfig::PANDA_ALLOCATORS>::Alloc<AllocScope::GLOBAL>(size_t, 362 template void *InternalAllocator<InternalAllocatorConfig::PANDA_ALLOCATORS>::Alloc<AllocScop [all...] |
H A D | pygote_space_allocator-inl.h | 88 inline void *PygoteSpaceAllocator<AllocConfigT>::Alloc(size_t size, Alignment align) in Alloc() function in ark::mem::PygoteSpaceAllocator 95 void *obj = runslotsAlloc_.template Alloc<true, false>(size, align); in Alloc() 103 obj = runslotsAlloc_.Alloc(size, align); in Alloc() 117 obj = runslotsAlloc_.Alloc(size, align); in Alloc() 120 obj = arena_->Alloc(size, align); in Alloc() 131 obj = arena_->Alloc(size, align); in Alloc() 202 auto bitmapData = allocator->Alloc(MarkBitmap::GetBitMapSizeInByte(heapSize)); in CreateLiveBitmap() 204 auto bitmap = allocator->Alloc(sizeof(MarkBitmap)); in CreateLiveBitmap()
|
H A D | malloc-proxy-allocator.h | 47 [[nodiscard]] void *Alloc(size_t size, Alignment align = DEFAULT_ALIGNMENT); 52 return static_cast<T *>(this->Alloc(sizeof(T) * size)); in AllocArray()
|
/arkcompiler/runtime_core/libpandabase/mem/ |
H A D | arena_allocator.h | 73 [[nodiscard]] virtual void *Alloc(size_t size, Alignment align = DEFAULT_ARENA_ALIGNMENT); 78 auto p = reinterpret_cast<void *>(Alloc(sizeof(T))); in New() 92 void *p = Alloc(SIZE_BEFORE_DATA_OFFSET + sizeof(element_type) * size); in New() 131 void *Alloc(size_t size, Alignment align = DEFAULT_ARENA_ALIGNMENT) in Alloc() function in panda::ArenaAllocatorT::OnStackBuffT 166 void *Alloc([[maybe_unused]] size_t size, [[maybe_unused]] Alignment align = DEFAULT_ARENA_ALIGNMENT) in Alloc() function in panda::ArenaAllocatorT::OnStackBuffT 241 return static_cast<T *>(Alloc(sizeof(T) * arr_length)); in AllocArray()
|
H A D | arena_allocator.cpp | 72 void *mem = arenas_->Alloc(size, alignment); in AllocateAndAddNewPool() 84 mem = arenas_->Alloc(size, alignment); in AllocateAndAddNewPool() 91 void *ArenaAllocatorT<use_oom_handler>::Alloc(size_t size, Alignment align) in Alloc() function in panda::ArenaAllocatorT 98 ret = buff_.Alloc(size, align); in Alloc()
|
/arkcompiler/runtime_core/static_core/libpandabase/mem/ |
H A D | arena_allocator.h | 71 [[nodiscard]] PANDA_PUBLIC_API void *Alloc(size_t size, Alignment align = DEFAULT_ARENA_ALIGNMENT); 76 auto p = reinterpret_cast<void *>(Alloc(sizeof(T))); in New() 90 void *p = Alloc(SIZE_BEFORE_DATA_OFFSET + sizeof(ElementType) * size); in New() 129 void *Alloc(size_t size, Alignment align = DEFAULT_ARENA_ALIGNMENT) in Alloc() function in ark::ArenaAllocatorT::OnStackBuffT 164 void *Alloc([[maybe_unused]] size_t size, [[maybe_unused]] Alignment align = DEFAULT_ARENA_ALIGNMENT) in Alloc() function in ark::ArenaAllocatorT::OnStackBuffT 239 return static_cast<T *>(Alloc(sizeof(T) * arrLength)); in AllocArray()
|
H A D | arena_allocator.cpp | 67 void *mem = arenas_->Alloc(size, alignment); in AllocateAndAddNewPool() 79 mem = arenas_->Alloc(size, alignment); in AllocateAndAddNewPool() 86 void *ArenaAllocatorT<USE_OOM_HANDLER>::Alloc(size_t size, Alignment align) in Alloc() function in ark::ArenaAllocatorT 93 ret = buff_.Alloc(size, align); in Alloc()
|
/arkcompiler/runtime_core/libpandabase/tests/ |
H A D | arena_test.cpp | 58 ASSERT_TRUE(arena->Alloc(alloc_size) != nullptr); in GetOccupiedAndFreeSizeTestImplementation() 71 void *first_allocation = arena->Alloc(alloc_size); in ResizeAndResetTestImplementation() 72 void *second_allocation = arena->Alloc(alloc_size); in ResizeAndResetTestImplementation() 78 void *third_allocation = arena->Alloc(alloc_size); in ResizeAndResetTestImplementation()
|
/arkcompiler/runtime_core/static_core/libpandabase/tests/ |
H A D | arena_test.cpp | 62 ASSERT_TRUE(arena->Alloc(allocSize) != nullptr); in GetOccupiedAndFreeSizeTestImplementation() 75 void *firstAllocation = arena->Alloc(allocSize); in ResizeAndResetTestImplementation() 76 void *secondAllocation = arena->Alloc(allocSize); in ResizeAndResetTestImplementation() 82 void *thirdAllocation = arena->Alloc(allocSize); in ResizeAndResetTestImplementation()
|
H A D | arena_allocator_test.cpp | 97 arr[i] = static_cast<T *>(aa.Alloc(sizeof(T), align)); in AllocateWithAlignment() 123 arr[i] = static_cast<T *>(aa.Alloc(sizeof(T), static_cast<Alignment>(randAlign))); in AllocateWithDiffAlignment() 197 addr = aa.Alloc(FIRST_ALLOC_SIZE); in TEST_F() 200 addr = aa.Alloc(4U); in TEST_F() 208 mem = aa.Alloc(DEFAULT_ARENA_SIZE / 2U); in TEST_F() 212 ASSERT_NE(tmp = aa.Alloc(DEFAULT_ARENA_SIZE - AlignUp(sizeof(Arena), GetAlignmentInBytes(DEFAULT_ARENA_ALIGNMENT))), in TEST_F() 216 ASSERT_EQ(tmp = aa.Alloc(DEFAULT_ARENA_SIZE + maxAlignDrift + 1U), nullptr); in TEST_F() 470 void *ptr = aa.Alloc(size, align); in TEST_F() 487 void *ptr = aa.Alloc(SIZE, align); in TEST_F() 570 [[maybe_unused]] void *tmp = aa.Alloc(sizeo in TEST_F() [all...] |
/arkcompiler/ets_frontend/ets2panda/compiler/core/ |
H A D | regAllocator.h | 43 [[nodiscard]] T *Alloc(const ir::AstNode *const node, Args &&...args) in Alloc() function in ark::es2panda::ark::es2panda::compiler::AllocatorBase 51 return PushBack(Alloc<T>(node, std::forward<Args>(args)...)); in Add() 107 auto *const ins = Alloc<T>(node, std::forward<Args>(args)...); in Emit() 125 auto *const ins = Alloc<T>(node, std::forward<Args>(args)...); in Emit()
|
/arkcompiler/ets_frontend/es2panda/compiler/core/ |
H A D | regAllocator.h | 66 auto *ins = Alloc<T>(node, std::forward<Args>(args)...); in Emit() 73 auto *ins = Alloc<T>(node, std::forward<Args>(args)...); in EmitRange() 123 T *Alloc(const ir::AstNode *node, Args &&... args) in Alloc() function in panda::es2panda::panda::es2panda::compiler::RegAllocator 135 insns.push_back(Alloc<T>(node, std::forward<Args>(args)...)); in Add()
|