Home
last modified time | relevance | path

Searched refs:pool (Results 1 - 25 of 47) sorted by relevance

12

/arkcompiler/runtime_core/static_core/verification/util/tests/
H A Dobj_pool_test.cpp39 static void VerifierTestObjPool1(Pool<I, C> &pool, int &result) in VerifierTestObjPool1() argument
42 auto q = pool.New(); in VerifierTestObjPool1()
43 auto p = pool.New(); in VerifierTestObjPool1()
44 EXPECT_EQ(pool.Count(), 2U); in VerifierTestObjPool1()
45 EXPECT_EQ(pool.FreeCount(), 0U); in VerifierTestObjPool1()
46 EXPECT_EQ(pool.AccCount(), 2U); in VerifierTestObjPool1()
50 EXPECT_EQ(pool.Count(), 2U); in VerifierTestObjPool1()
51 EXPECT_EQ(pool.FreeCount(), 2U); in VerifierTestObjPool1()
52 EXPECT_EQ(pool.AccCount(), 0U); in VerifierTestObjPool1()
56 auto q = pool in VerifierTestObjPool1()
93 VerifierTestObjPool2(Pool<I, C> &pool, int &result) VerifierTestObjPool2() argument
117 VerifierTestObjPool3(Pool<I, C> &pool, int &result) VerifierTestObjPool3() argument
[all...]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/proxies/mem/items_pool/
H A Dtest_items_pool.cpp34 static PaddedItem *GetData(const std::unique_ptr<Pool> &pool) in GetData() argument
36 return pool->data_; in GetData()
39 static PaddedItem *&GetCurrentPos(const std::unique_ptr<Pool> &pool) in GetCurrentPos() argument
41 return pool->currentPos_; in GetCurrentPos()
44 static PaddedItem *&GetFreeList(const std::unique_ptr<Pool> &pool) in GetFreeList() argument
46 return pool->freeList_; in GetFreeList()
63 static ItemsPoolTest::PaddedItem *GetData(const T &pool) in GetData() argument
65 return ItemsPoolTest::GetData(pool); in GetData()
69 static ItemsPoolTest::PaddedItem *&GetCurrentPos(const T &pool) in GetCurrentPos() argument
71 return ItemsPoolTest::GetCurrentPos(pool); in GetCurrentPos()
75 GetFreeList(const T &pool) GetFreeList() argument
84 auto pool = ItemsPoolTest::CreatePool(); TEST_F() local
115 auto pool = ItemsPoolTest::CreatePool(); TEST_F() local
290 auto pool = ItemsPoolTest::CreatePool(); TEST_F() local
401 auto pool = ItemsPoolTest::CreatePool(); TEST_F() local
[all...]
/arkcompiler/runtime_core/static_core/libpandabase/mem/
H A Dmmap_mem_pool-inl.h55 Pool pool(size, elementMem); in PopFreePool()
67 uintptr_t poolStart = ToUintPtr(pool.GetMem()); in PopFreePool()
68 size_t poolSize = pool.GetSize(); in PopFreePool()
69 LOG_MMAP_MEM_POOL(DEBUG) << "Return pages to OS from Free Pool to get zeroed memory: start = " << pool.GetMem() in PopFreePool()
73 return pool; in PopFreePool()
77 inline std::pair<size_t, OSPagesPolicy> MmapPoolMap::PushFreePool(Pool pool) in PushFreePool() argument
80 auto mmapPoolElement = poolMap_.find(pool.GetMem()); in PushFreePool()
82 LOG_MMAP_MEM_POOL(FATAL) << "can't find mmap pool in the pool map when PushFreePool"; in PushFreePool()
110 // It is the last pool in PushFreePool()
133 AddNewPool(Pool pool) AddNewPool() argument
216 auto pool = unreturnedPool_.GetAndClearUnreturnedPool(poolSize); ReleasePagesInUnreturnedPool() local
244 Pool pool = std::get<0>(i.second); ClearNonObjectMmapedPools() local
389 Pool pool = NULLPOOL; AllocPoolUnsafe() local
492 Pool pool = AllocPoolUnsafe<OS_ALLOC_POLICY>(size, spaceType, allocatorType, allocatorAddr); AllocPoolImpl() local
[all...]
H A Dmmap_mem_pool.h41 explicit MmapPool(Pool pool, FreePoolsIter freePoolsIter, bool returnedToOs = true) in MmapPool() argument
42 : pool_(pool), returnedToOs_(returnedToOs), freePoolsIter_(freePoolsIter) in MmapPool()
76 // A free pool will be store in the free_pools_, and it's iterator will be recorded in the freePoolsIter_.
77 // If the freePoolsIter_ is equal to the end of freePools_, the pool is used.
96 // record the iterator of the pool in the multimap
100 /// @brief Class represents current pool that is returning to OS
104 explicit UnreturnedToOSPool(MmapPool *pool) : pool_(pool) in UnreturnedToOSPool() argument
111 * and creates a pool with @param size that needs to be cleared
112 * @param size size of unreturned to OS pool
[all...]
H A Dmem_pool.h40 explicit Pool(std::pair<size_t, void *> pool) : size_(pool.first), mem_(pool.second) {} in Pool() argument
93 // because we set up arena at the first bytes of the pool
121 * Allocates pool with at least size bytes
123 * @param size - minimal size of a pool in bytes
124 * @param space_type - type of the space which pool allocated for
127 * If it is not defined, it means that allocator header will be located at the first bytes of the returned pool.
128 * @return pool info with the size and a pointer
144 * Frees allocated pool
[all...]
/arkcompiler/runtime_core/libpandabase/tests/
H A Dpool_map_test.cpp46 void AddToPoolMap(Pool pool, SpaceType space_type, AllocatorType allocator_type, void *allocator_addr = nullptr) in AddToPoolMap() argument
49 allocator_addr = pool.GetMem(); in AddToPoolMap()
51 pools_.push_back(pool); in AddToPoolMap()
52 pool_map_.AddPoolToMap(pool.GetMem(), pool.GetSize(), space_type, allocator_type, allocator_addr); in AddToPoolMap()
55 void RemovePoolFromMap(Pool pool) in RemovePoolFromMap() argument
57 auto items = std::remove(pools_.begin(), pools_.end(), pool); in RemovePoolFromMap()
60 pool_map_.RemovePoolFromMap(pool.GetMem(), pool.GetSize()); in RemovePoolFromMap()
93 void CheckRandomPoolAddress(Pool pool, SpaceTyp argument
[all...]
/arkcompiler/runtime_core/static_core/libpandabase/tests/
H A Dpool_map_test.cpp50 void AddToPoolMap(Pool pool, SpaceType spaceType, AllocatorType allocatorType, void *allocatorAddr = nullptr) in AddToPoolMap() argument
53 allocatorAddr = pool.GetMem(); in AddToPoolMap()
55 pools_.push_back(pool); in AddToPoolMap()
56 poolMap_.AddPoolToMap(pool.GetMem(), pool.GetSize(), spaceType, allocatorType, allocatorAddr); in AddToPoolMap()
59 void RemovePoolFromMap(Pool pool) in RemovePoolFromMap() argument
61 auto items = std::remove(pools_.begin(), pools_.end(), pool); in RemovePoolFromMap()
64 poolMap_.RemovePoolFromMap(pool.GetMem(), pool.GetSize()); in RemovePoolFromMap()
100 void CheckRandomPoolAddress(Pool pool, SpaceTyp argument
[all...]
H A Dmmap_mem_pool_test.cpp49 void FreePoolWithPolicy(MmapMemPool *memPool, OSPagesPolicy policy, Pool &pool) in FreePoolWithPolicy() argument
52 memPool->template FreePool<OSPagesPolicy::NO_RETURN>(pool.GetMem(), pool.GetSize()); in FreePoolWithPolicy()
54 memPool->template FreePool<OSPagesPolicy::IMMEDIATE_RETURN>(pool.GetMem(), pool.GetSize()); in FreePoolWithPolicy()
338 auto pool = memPool->AllocPool(7_MB, SpaceType::SPACE_TYPE_OBJECT, AllocatorType::HUMONGOUS_ALLOCATOR); in TEST_F() local
339 memPool->FreePool(pool.GetMem(), pool.GetSize()); in TEST_F()
340 pool = memPool->AllocPool(8_MB, SpaceType::SPACE_TYPE_OBJECT, AllocatorType::HUMONGOUS_ALLOCATOR); in TEST_F()
341 ASSERT_TRUE(pool in TEST_F()
[all...]
/arkcompiler/runtime_core/libpandabase/mem/
H A Dmmap_mem_pool-inl.h45 Pool pool(size, element_mem); in PopFreePool()
55 return pool; in PopFreePool()
58 inline void MmapPoolMap::PushFreePool(Pool pool) in PushFreePool() argument
60 auto mmap_pool_element = pool_map_.find(pool.GetMem()); in PushFreePool()
62 LOG_MMAP_MEM_POOL(FATAL) << "can't find mmap pool in the pool map when PushFreePool"; in PushFreePool()
91 inline void MmapPoolMap::AddNewPool(Pool pool) in AddNewPool() argument
93 auto new_mmap_pool = new MmapPool(pool, free_pools_.end()); in AddNewPool()
94 pool_map_.insert(std::pair<void *, MmapPool *>(pool.GetMem(), new_mmap_pool)); in AddNewPool()
100 for (const auto &pool in GetAllSize()
154 Pool pool = std::get<0>(i.second); ~MmapMemPool() local
317 Pool pool = NULLPOOL; AllocPoolUnsafe() local
410 Pool pool = AllocPoolUnsafe(size, space_type, allocator_type, allocator_addr); AllocPoolImpl() local
[all...]
H A Dmmap_mem_pool.h38 explicit MmapPool(Pool pool, FreePoolsIter free_pools_iter) : pool_(pool), free_pools_iter_(free_pools_iter) {} in MmapPool() argument
60 // A free pool will be store in the free_pools_, and it's iterator will be recorded in the free_pools_iter_.
61 // If the free_pools_iter_ is equal to the end of free_pools_, the pool is used.
79 // record the iterator of the pool in the multimap
89 for (auto &pool : pool_map_) { in ~MmapPoolMap()
90 delete pool.second; in ~MmapPoolMap()
97 // Find a free pool with enough size in the map. Split the pool, if the pool siz
[all...]
H A Dmem_pool.h30 explicit Pool(std::pair<size_t, void *> pool) : size_(pool.first), mem_(pool.second) {} in Pool() argument
82 // because we set up arena at the first bytes of the pool
103 * Allocates pool with at least size bytes
104 * @param size - minimal size of a pool in bytes
105 * @param space_type - type of the space which pool allocated for
108 * If it is not defined, it means that allocator header will be located at the first bytes of the returned pool.
109 * @return pool info with the size and a pointer
118 * Frees allocated pool
[all...]
/arkcompiler/runtime_core/static_core/runtime/mem/
H A Dhumongous_obj_allocator-inl.h120 // Each memory pool is PAGE_SIZE aligned, so to get a header we need just to align a pointer in FreeUnsafe()
156 LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << " check pool at addr " << std::hex << currentPool; in IterateOverObjects()
169 LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << "Add memory pool to HumongousObjAllocator from " << std::hex << mem in AddMemoryPool()
199 LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << "Try to insert pool with size " << header->GetPoolSize() in InsertPool()
208 // We have a crowded out pool or the "header" argument in mem_header in InsertPool()
250 // Try to find a pool with this range in IterateOverObjectsInRange()
258 // Use current pool here because it is page aligned in IterateOverObjectsInRange()
262 // Check that this range is located in the same pool in IterateOverObjectsInRange()
349 void HumongousObjAllocator<AllocConfigT, LockConfigT>::MemoryPoolList::Pop(MemoryPoolHeader *pool) in Pop() argument
351 LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << "Pop a pool wit in Pop() local
361 Insert(MemoryPoolHeader *pool) Insert() argument
363 LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << "Insert a pool with addr " << std::hex << pool << " into the pool list"; Insert() local
391 IsInThisList(MemoryPoolHeader *pool) IsInThisList() argument
420 TryToInsert(MemoryPoolHeader *pool) TryToInsert() argument
422 LOG_HUMONGOUS_OBJ_ALLOCATOR(DEBUG) << "Try to insert a pool in Reserved memory with addr " << std::hex << pool; TryToInsert() local
459 SortedInsert(MemoryPoolHeader *pool) SortedInsert() argument
[all...]
H A Dhumongous_obj_allocator.h54 * using the whole memory pool for each.
136 * @brief returns minimum pool size to allocate an object with @param obj_size bytes
141 // To note: It is not the smallest size of the pool in GetMinPoolSize()
235 void Insert(MemoryPoolHeader *pool);
237 void Pop(MemoryPoolHeader *pool);
240 * @brief Try to find a pool suitable for object with @param size.
241 * @return a pointer to pool header on success, nullptr otherwise.
255 bool IsInThisList(MemoryPoolHeader *pool);
262 // When we free a pool, we try to insert in into ReservedMemoryPools first:
263 // - If the pool i
273 Pop(MemoryPoolHeader *pool) Pop() argument
[all...]
H A Dinternal_allocator.cpp145 // Get rid of extra pool adding to the allocator in AllocInRunSlots()
153 LOG_INTERNAL_ALLOCATOR(DEBUG) << "RunSlotsAllocator didn't allocate memory, try to add new pool"; in AllocInRunSlots()
154 auto pool = PoolManager::GetMmapMemPool()->AllocPool(poolSize, SpaceType::SPACE_TYPE_INTERNAL, in AllocInRunSlots() local
156 if (UNLIKELY(pool.GetMem() == nullptr)) { in AllocInRunSlots()
159 runslotsAllocator->AddMemoryPool(pool.GetMem(), pool.GetSize()); in AllocInRunSlots()
160 LOG_INTERNAL_ALLOCATOR(DEBUG) << "RunSlotsAllocator try to allocate memory again after pool adding"; in AllocInRunSlots()
192 // Get rid of extra pool adding to the allocator in AllocViaFreeListAllocator()
200 LOG_INTERNAL_ALLOCATOR(DEBUG) << "FreeListAllocator didn't allocate memory, try to add new pool"; in AllocViaFreeListAllocator()
202 auto pool in AllocViaFreeListAllocator() local
230 auto pool = PoolManager::GetMmapMemPool()->AllocPool(poolSize, SpaceType::SPACE_TYPE_INTERNAL, AllocViaHumongousAllocator() local
[all...]
/arkcompiler/ets_runtime/ecmascript/tests/
H A Djit_fort_test.cpp73 MemDescPool *pool = new MemDescPool(1, 1); in HWTEST_F_L0() local
74 ASSERT_NE(pool, nullptr); in HWTEST_F_L0()
75 pool->GetDescFromPool(); in HWTEST_F_L0()
80 MemDescPool *pool = new MemDescPool(1, 1); in HWTEST_F_L0() local
81 ASSERT_NE(pool, nullptr); in HWTEST_F_L0()
82 pool->~MemDescPool(); in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/mempool/src/
H A Dmempool.cpp29 void MemPoolCtrler::FreeMemBlocks(const MemPool &pool, MemBlock *fixedMemHead, MemBlock *bigMemHead) in FreeMemBlocks() argument
31 (void)(pool); in FreeMemBlocks()
68 // Allocate a new memory pool and register it in controller
97 MemBlock *MemPoolCtrler::AllocMemBlock(const MemPool &pool, size_t size) in AllocMemBlock() argument
100 return AllocFixMemBlock(pool); in AllocMemBlock()
102 return AllocBigMemBlock(pool, size); in AllocMemBlock()
106 MemBlock *MemPoolCtrler::AllocFixMemBlock(const MemPool &pool) in AllocFixMemBlock() argument
108 (void)(pool); in AllocFixMemBlock()
129 MemBlock *MemPoolCtrler::AllocBigMemBlock(const MemPool &pool, size_t size) const in AllocBigMemBlock() argument
132 (void)(pool); in AllocBigMemBlock()
[all...]
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/interop_js/
H A Dinterop_stacks.h27 void *pool = ark::os::mem::MapRWAnonymousWithAlignmentRaw(POOL_SIZE, ark::os::mem::GetPageSize()); in InteropCallStack() local
28 if (pool == nullptr) { in InteropCallStack()
31 startAddr_ = reinterpret_cast<Record *>(pool); in InteropCallStack()
32 endAddr_ = reinterpret_cast<Record *>(ToUintPtr(pool) + POOL_SIZE); in InteropCallStack()
/arkcompiler/runtime_core/static_core/scripts/code_style/
H A Dcode_style_check.py82 pool = multiprocessing.Pool(proc_count)
90 proc = pool.apply_async(func=run_clang_format, args=(
103 # Safely terminate the pool
104 pool.close()
105 pool.join()
H A Dclang_tidy_rename.py84 pool = multiprocessing.Pool(multiprocessing.cpu_count())
93 proc = pool.apply_async(func=run_clang_tidy, args=(
101 # Safely terminate the pool
102 pool.close()
103 pool.join()
/arkcompiler/runtime_core/static_core/runtime/include/mem/
H A Dallocator-inl.h41 auto pool = heapSpace->TryAllocPool(poolSize, spaceType, AllocT::GetAllocatorType(), objectAllocator); in AddPoolsAndAlloc() local
42 if (UNLIKELY(pool.GetMem() == nullptr)) { in AddPoolsAndAlloc()
45 bool addedMemoryPool = objectAllocator->AddMemoryPool(pool.GetMem(), pool.GetSize()); in AddPoolsAndAlloc()
47 LOG(FATAL, ALLOC) << "ObjectAllocator: couldn't add memory pool to object allocator"; in AddPoolsAndAlloc()
/arkcompiler/runtime_core/static_core/runtime/tests/
H A Dbump_allocator_test.cpp117 auto pool = PoolManager::GetMmapMemPool()->AllocPool(BUFF_SIZE, SpaceType::SPACE_TYPE_INTERNAL, in DEATH_TEST_F() local
120 NonObjectBumpAllocator<false> bpAllocator(pool, SpaceType::SPACE_TYPE_INTERNAL, &memStats); in DEATH_TEST_F()
166 auto pool = PoolManager::GetMmapMemPool()->AllocPool(TLAB_SIZE + COMMON_BUFFER_SIZE, SpaceType::SPACE_TYPE_INTERNAL, in TEST_F() local
169 NonObjectBumpAllocator<true> allocator(pool, SpaceType::SPACE_TYPE_OBJECT, &memStats, 1U); in TEST_F()
201 auto pool = PoolManager::GetMmapMemPool()->AllocPool(TLAB_SIZE * TLAB_COUNT, SpaceType::SPACE_TYPE_INTERNAL, in TEST_F() local
204 NonObjectBumpAllocator<true> allocator(pool, SpaceType::SPACE_TYPE_OBJECT, &memStats, TLAB_COUNT - 1); in TEST_F()
H A Dhumongous_obj_allocator_test.cpp69 Pool pool = PoolManager::GetMmapMemPool()->AllocPool(AlignUp(size, PANDA_POOL_ALIGNMENT_IN_BYTES), in AddMemoryPoolToAllocator() local
72 ASSERT(pool.GetSize() >= size); in AddMemoryPoolToAllocator()
73 if (pool.GetMem() == nullptr) { in AddMemoryPoolToAllocator()
74 ASSERT_TRUE(0 && "Can't get a new pool from PoolManager"); in AddMemoryPoolToAllocator()
76 allocatedPoolsByPoolManager_.push_back(pool); in AddMemoryPoolToAllocator()
77 if (!alloc.AddMemoryPool(pool.GetMem(), size)) { in AddMemoryPoolToAllocator()
78 ASSERT_TRUE(0 && "Can't add mem pool to allocator"); in AddMemoryPoolToAllocator()
84 // We use common PoolManager from Runtime. Therefore, we have the same pool allocation for both cases.
103 // Mutex, which allows only one thread to add pool to the pool vecto
[all...]
H A Dfreelist_allocator_test.cpp72 Pool pool = PoolManager::GetMmapMemPool()->AllocPool(DEFAULT_POOL_SIZE_FOR_ALLOC, SpaceType::SPACE_TYPE_OBJECT, variable
74 ASSERT(pool.GetSize() == DEFAULT_POOL_SIZE_FOR_ALLOC);
75 if (pool.GetMem() == nullptr) {
76 ASSERT_TRUE(0 && "Can't get a new pool from PoolManager");
78 allocatedPoolsByPoolManager_.push_back(pool);
79 if (!alloc.AddMemoryPool(pool.GetMem(), pool.GetSize())) {
80 ASSERT_TRUE(0 && "Can't add mem pool to allocator");
86 // We use common PoolManager from Runtime. Therefore, we have the same pool allocation for both cases.
112 // Mutex, which allows only one thread to add pool t
[all...]
/arkcompiler/ets_runtime/ecmascript/mem/
H A Dfree_object_set.h39 explicit FreeObjectSet(SetType type, MemDescPool *pool) : setType_(type), memDescPool_(pool) in FreeObjectSet() argument
/arkcompiler/ets_runtime/ecmascript/pgo_profiler/ap_file/
H A Dpgo_record_pool.h266 void Merge(const PGOContext &context, PGOAbcFilePool &pool) in Merge() argument
268 if (pool.GetPool() == nullptr) { in Merge()
271 pool_->Merge(*pool.GetPool(), [&](ApEntityId oldEntryId, ApEntityId newEntryId) { in Merge()
276 void Copy(const std::shared_ptr<PGOAbcFilePool> &pool) in Copy() argument
278 for (auto &entry : pool->GetPool()->GetPool()) { in Copy()

Completed in 217 milliseconds

12