/arkcompiler/runtime_core/static_core/runtime/coretypes/ |
H A D | array.cpp | 27 static Array *AllocateArray(ark::BaseClass *arrayClass, size_t elemSize, ArraySizeT length, ark::SpaceType spaceType, in AllocateArray() argument 36 if (LIKELY(spaceType == ark::SpaceType::SPACE_TYPE_OBJECT)) { in AllocateArray() 41 if (spaceType == ark::SpaceType::SPACE_TYPE_NON_MOVABLE_OBJECT) { in AllocateArray() 49 Array *Array::Create(ark::Class *arrayClass, const uint8_t *data, ArraySizeT length, ark::SpaceType spaceType, in Create() argument 53 auto *array = AllocateArray(arrayClass, elemSize, length, spaceType, pinned); in Create() 71 Array *Array::Create(ark::Class *arrayClass, ArraySizeT length, ark::SpaceType spaceType, bool pinned) in Create() argument 74 auto *array = AllocateArray(arrayClass, elemSize, length, spaceType, pinned); in Create() 89 Array *Array::Create(DynClass *dynarrayclass, ArraySizeT length, ark::SpaceType spaceType, bool pinned) in Create() argument 93 auto *array = AllocateArray(arrayClass, elemSize, length, spaceType, pinned); in Create() 108 Array *Array::CreateTagged(const PandaVM *vm, ark::BaseClass *arrayClass, ArraySizeT length, ark::SpaceType spaceType, in CreateTagged() argument [all...] |
/arkcompiler/runtime_core/static_core/libpandabase/mem/ |
H A D | space.h | 43 constexpr size_t SpaceTypeToIndex(SpaceType spaceType) in SpaceTypeToIndex() argument 45 return helpers::ToUnderlying(spaceType); in SpaceTypeToIndex() 50 constexpr bool IsHeapSpace(SpaceType spaceType) in IsHeapSpace() argument 52 return (spaceType == SpaceType::SPACE_TYPE_OBJECT) || (spaceType == SpaceType::SPACE_TYPE_HUMONGOUS_OBJECT) || in IsHeapSpace() 53 (spaceType == SpaceType::SPACE_TYPE_NON_MOVABLE_OBJECT); in IsHeapSpace()
|
H A D | pool_map.cpp | 20 void PoolMap::AddPoolToMap(const void *poolAddr, size_t poolSize, SpaceType spaceType, AllocatorType allocatorType, in AddPoolToMap() argument 28 poolMap_[firstMapNum].Initialize(firstMapNum, spaceType, allocatorType, allocatorAddr); in AddPoolToMap() 30 poolMap_[i].Initialize(firstMapNum, spaceType, allocatorType, allocatorAddr); in AddPoolToMap() 62 SpaceType spaceType = poolMap_[mapNum].GetSpaceType(); in GetSpaceType() local 64 ASSERT(spaceType != SpaceType::SPACE_TYPE_UNDEFINED); in GetSpaceType() 65 return spaceType; in GetSpaceType()
|
H A D | mmap_mem_pool-inl.h | 274 inline ArenaT *MmapMemPool::AllocArenaImpl(size_t size, SpaceType spaceType, AllocatorType allocatorType, in AllocArenaImpl() argument 279 << SpaceTypeToString(spaceType); in AllocArenaImpl() 280 Pool poolForArena = AllocPoolUnsafe<OS_ALLOC_POLICY>(size, spaceType, allocatorType, allocatorAddr); in AllocArenaImpl() 284 << " for " << SpaceTypeToString(spaceType); in AllocArenaImpl() 293 << SpaceTypeToString(spaceType); in AllocArenaImpl() 309 inline void *MmapMemPool::AllocRawMemNonObjectImpl(size_t size, SpaceType spaceType) in AllocRawMemNonObjectImpl() argument 311 ASSERT(!IsHeapSpace(spaceType)); in AllocRawMemNonObjectImpl() 313 if (LIKELY(nonObjectSpacesMaxSize_[SpaceTypeToIndex(spaceType)] >= in AllocRawMemNonObjectImpl() 314 nonObjectSpacesCurrentSize_[SpaceTypeToIndex(spaceType)] + size)) { in AllocRawMemNonObjectImpl() 317 nonObjectSpacesCurrentSize_[SpaceTypeToIndex(spaceType)] in AllocRawMemNonObjectImpl() 384 AllocPoolUnsafe(size_t size, SpaceType spaceType, AllocatorType allocatorType, const void *allocatorAddr) AllocPoolUnsafe() argument 429 poolMap_.AddPoolToMap(ToVoidPtr(ToUintPtr(pool.GetMem()) - GetMinObjectAddress()), pool.GetSize(), spaceType, AllocPoolUnsafe() local 486 AllocPoolImpl(size_t size, SpaceType spaceType, AllocatorType allocatorType, const void *allocatorAddr) AllocPoolImpl() argument 561 SpaceType spaceType = poolMap_.GetSpaceType(ToVoidPtr(ToUintPtr(addr) - GetMinObjectAddress())); GetSpaceTypeForAddrImpl() local [all...] |
H A D | malloc_mem_pool-inl.h | 38 inline ArenaT *MallocMemPool::AllocArenaImpl(size_t size, [[maybe_unused]] SpaceType spaceType, in AllocArenaImpl() argument 43 << SpaceTypeToString(spaceType); in AllocArenaImpl() 59 << " at addr = " << std::hex << buff << " for " << SpaceTypeToString(spaceType); in AllocArenaImpl() 78 inline Pool MallocMemPool::AllocPoolImpl(size_t size, [[maybe_unused]] SpaceType spaceType, in AllocPoolImpl() argument 83 << SpaceTypeToString(spaceType); in AllocPoolImpl() 86 << mem << " for " << SpaceTypeToString(spaceType); in AllocPoolImpl()
|
H A D | pool_manager.cpp | 30 Arena *PoolManager::AllocArena(size_t size, SpaceType spaceType, AllocatorType allocatorType, const void *allocatorAddr) in AllocArena() argument 34 size, spaceType, allocatorType, allocatorAddr); in AllocArena() 36 return mallocMemPool_->template AllocArenaImpl<Arena, OSPagesAllocPolicy::NO_POLICY>(size, spaceType, allocatorType, in AllocArena()
|
H A D | malloc_mem_pool.h | 27 ArenaT *AllocArenaImpl(size_t size, SpaceType spaceType, AllocatorType allocatorType, const void *allocatorAddr); 33 static Pool AllocPoolImpl(size_t size, SpaceType spaceType, AllocatorType allocatorType, const void *allocatorAddr);
|
H A D | mem_pool.h | 95 inline ArenaT *AllocArena(size_t size, SpaceType spaceType, AllocatorType allocatorType, in AllocArena() argument 99 size, spaceType, allocatorType, allocatorAddr); in AllocArena() 131 Pool AllocPool(size_t size, SpaceType spaceType, AllocatorType allocatorType, const void *allocatorAddr = nullptr) in AllocPool() argument 134 size, spaceType, allocatorType, allocatorAddr); in AllocPool()
|
H A D | arena_allocator.cpp | 28 ArenaAllocatorT<USE_OOM_HANDLER>::ArenaAllocatorT(SpaceType spaceType, BaseMemStats *memStats, in ArenaAllocatorT() argument 30 : memStats_(memStats), spaceType_(spaceType), limitAllocSizeByPool_(limitAllocSizeByPool) in ArenaAllocatorT() 41 ArenaAllocatorT<USE_OOM_HANDLER>::ArenaAllocatorT(OOMHandler oomHandler, SpaceType spaceType, BaseMemStats *memStats, in ArenaAllocatorT() argument 43 : memStats_(memStats), spaceType_(spaceType), oomHandler_(oomHandler), limitAllocSizeByPool_(limitAllocSizeByPool) in ArenaAllocatorT()
|
H A D | pool_map.h | 76 PANDA_PUBLIC_API void AddPoolToMap(const void *poolAddr, size_t poolSize, SpaceType spaceType, 101 void Initialize(MapNumType segmentFirstMapNum, SpaceType spaceType, AllocatorType allocatorType, in Initialize() argument 113 spaceType_ = spaceType; in Initialize()
|
H A D | mmap_mem_pool.h | 271 ArenaT *AllocArenaImpl(size_t size, SpaceType spaceType, AllocatorType allocatorType, const void *allocatorAddr); 277 void *AllocRawMemNonObjectImpl(size_t size, SpaceType spaceType); 283 Pool AllocPoolImpl(size_t size, SpaceType spaceType, AllocatorType allocatorType, const void *allocatorAddr); 292 Pool AllocPoolUnsafe(size_t size, SpaceType spaceType, AllocatorType allocatorType, const void *allocatorAddr);
|
/arkcompiler/runtime_core/static_core/runtime/mem/ |
H A D | heap_space.cpp | 152 inline Pool HeapSpace::TryAllocPoolBase(size_t poolSize, SpaceType spaceType, AllocatorType allocatorType, in TryAllocPoolBase() argument 162 poolSize, spaceType, allocatorType, allocatorPtr); in TryAllocPoolBase() 165 poolSize, spaceType, allocatorType, allocatorPtr); in TryAllocPoolBase() 172 Pool HeapSpace::TryAllocPool(size_t poolSize, SpaceType spaceType, AllocatorType allocatorType, void *allocatorPtr) in TryAllocPool() argument 175 return TryAllocPoolBase(poolSize, spaceType, allocatorType, allocatorPtr, GetCurrentFreeBytes(), &memSpace_); in TryAllocPool() 178 inline Arena *HeapSpace::TryAllocArenaBase(size_t arenaSize, SpaceType spaceType, AllocatorType allocatorType, in TryAllocArenaBase() argument 186 return PoolManager::AllocArena(arenaSize, spaceType, allocatorType, allocatorPtr); in TryAllocArenaBase() 193 Arena *HeapSpace::TryAllocArena(size_t arenaSize, SpaceType spaceType, AllocatorType allocatorType, void *allocatorPtr) in TryAllocArena() argument 196 return TryAllocArenaBase(arenaSize, spaceType, allocatorType, allocatorPtr, GetCurrentFreeBytes(), &memSpace_); in TryAllocArena() 367 Pool GenerationalSpaces::AllocSharedPool(size_t poolSize, SpaceType spaceType, AllocatorTyp argument 377 AllocAlonePoolForYoung(SpaceType spaceType, AllocatorType allocatorType, void *allocatorPtr) AllocAlonePoolForYoung() argument 387 TryAllocPoolForYoung(size_t poolSize, SpaceType spaceType, AllocatorType allocatorType, void *allocatorPtr) TryAllocPoolForYoung() argument 397 TryAllocPoolForTenured(size_t poolSize, SpaceType spaceType, AllocatorType allocatorType, void *allocatorPtr, OSPagesAllocPolicy allocPolicy) TryAllocPoolForTenured() argument 405 TryAllocPool(size_t poolSize, SpaceType spaceType, AllocatorType allocatorType, void *allocatorPtr) TryAllocPool() argument 411 TryAllocArenaForTenured(size_t arenaSize, SpaceType spaceType, AllocatorType allocatorType, void *allocatorPtr) TryAllocArenaForTenured() argument 419 TryAllocArena(size_t arenaSize, SpaceType spaceType, AllocatorType allocatorType, void *allocatorPtr) TryAllocArena() argument [all...] |
H A D | heap_space.h | 94 [[nodiscard]] virtual Pool TryAllocPool(size_t poolSize, SpaceType spaceType, AllocatorType allocatorType, 98 [[nodiscard]] virtual Arena *TryAllocArena(size_t arenaSize, SpaceType spaceType, AllocatorType allocatorType, 193 [[nodiscard]] Pool TryAllocPoolBase(size_t poolSize, SpaceType spaceType, AllocatorType allocatorType, 197 [[nodiscard]] Arena *TryAllocArenaBase(size_t arenaSize, SpaceType spaceType, AllocatorType allocatorType, 329 [[nodiscard]] Pool AllocAlonePoolForYoung(SpaceType spaceType, AllocatorType allocatorType, void *allocatorPtr); 335 [[nodiscard]] Pool TryAllocPoolForYoung(size_t poolSize, SpaceType spaceType, AllocatorType allocatorType, 342 [[nodiscard]] Pool TryAllocPoolForTenured(size_t poolSize, SpaceType spaceType, AllocatorType allocatorType, 346 [[nodiscard]] Pool TryAllocPool(size_t poolSize, SpaceType spaceType, AllocatorType allocatorType, 349 [[nodiscard]] Arena *TryAllocArenaForTenured(size_t arenaSize, SpaceType spaceType, AllocatorType allocatorType, 352 [[nodiscard]] Arena *TryAllocArena(size_t arenaSize, SpaceType spaceType, AllocatorTyp [all...] |
H A D | region_allocator-inl.h | 34 SpaceType spaceType, AllocatorType allocatorType, in RegionAllocatorBase() 38 spaceType_(spaceType), in RegionAllocatorBase() 42 regionSpace_(spaceType, allocatorType, ®ionPool_, emptyTenuredRegionsMaxCount), in RegionAllocatorBase() 51 initBlock_ = spaces_->AllocSharedPool(initSpaceSize, spaceType, AllocatorType::REGION_ALLOCATOR, this); in RegionAllocatorBase() 63 SpaceType spaceType, AllocatorType allocatorType, in RegionAllocatorBase() 67 spaceType_(spaceType), in RegionAllocatorBase() 69 regionSpace_(spaceType, allocatorType, sharedRegionPool, emptyTenuredRegionsMaxCount), in RegionAllocatorBase() 116 SpaceType spaceType, size_t initSpaceSize, bool extend, in RegionAllocator() 118 : RegionAllocatorBase<LockConfigT>(memStats, spaces, spaceType, AllocatorType::REGION_ALLOCATOR, initSpaceSize, in RegionAllocator() 127 SpaceType spaceType, RegionPoo in RegionAllocator() 33 RegionAllocatorBase(MemStatsType *memStats, GenerationalSpaces *spaces, SpaceType spaceType, AllocatorType allocatorType, size_t initSpaceSize, bool extend, size_t regionSize, size_t emptyTenuredRegionsMaxCount) RegionAllocatorBase() argument 62 RegionAllocatorBase(MemStatsType *memStats, GenerationalSpaces *spaces, SpaceType spaceType, AllocatorType allocatorType, RegionPool *sharedRegionPool, size_t emptyTenuredRegionsMaxCount) RegionAllocatorBase() argument 115 RegionAllocator(MemStatsType *memStats, GenerationalSpaces *spaces, SpaceType spaceType, size_t initSpaceSize, bool extend, size_t emptyTenuredRegionsMaxCount) RegionAllocator() argument 126 RegionAllocator(MemStatsType *memStats, GenerationalSpaces *spaces, SpaceType spaceType, RegionPool *sharedRegionPool, size_t emptyTenuredRegionsMaxCount) RegionAllocator() argument 577 RegionNonmovableAllocator( MemStatsType *memStats, GenerationalSpaces *spaces, SpaceType spaceType, size_t initSpaceSize, bool extend) RegionNonmovableAllocator() argument 586 RegionNonmovableAllocator( MemStatsType *memStats, GenerationalSpaces *spaces, SpaceType spaceType, RegionPool *sharedRegionPool) RegionNonmovableAllocator() argument 682 RegionHumongousAllocator(MemStatsType *memStats, GenerationalSpaces *spaces, SpaceType spaceType) RegionHumongousAllocator() argument [all...] |
H A D | region_allocator.h | 70 explicit RegionAllocatorBase(MemStatsType *memStats, GenerationalSpaces *spaces, SpaceType spaceType, 73 explicit RegionAllocatorBase(MemStatsType *memStats, GenerationalSpaces *spaces, SpaceType spaceType, 165 SpaceType spaceType = SpaceType::SPACE_TYPE_OBJECT, size_t initSpaceSize = 0, 174 explicit RegionAllocator(MemStatsType *memStats, GenerationalSpaces *spaces, SpaceType spaceType, 527 explicit RegionNonmovableAllocator(MemStatsType *memStats, GenerationalSpaces *spaces, SpaceType spaceType, 529 explicit RegionNonmovableAllocator(MemStatsType *memStats, GenerationalSpaces *spaces, SpaceType spaceType, 600 explicit RegionHumongousAllocator(MemStatsType *memStats, GenerationalSpaces *spaces, SpaceType spaceType);
|
/arkcompiler/runtime_core/static_core/runtime/include/mem/ |
H A D | allocator-inl.h | 24 SpaceType spaceType, HeapSpace *heapSpace) in AllocateSafe() 28 return AddPoolsAndAlloc<AllocT, NEED_LOCK>(size, align, objectAllocator, poolSize, spaceType, heapSpace); in AllocateSafe() 35 size_t poolSize, SpaceType spaceType, HeapSpace *heapSpace) in AddPoolsAndAlloc() 41 auto pool = heapSpace->TryAllocPool(poolSize, spaceType, AllocT::GetAllocatorType(), objectAllocator); in AddPoolsAndAlloc() 23 AllocateSafe(size_t size, Alignment align, AllocT *objectAllocator, size_t poolSize, SpaceType spaceType, HeapSpace *heapSpace) AllocateSafe() argument 34 AddPoolsAndAlloc(size_t size, Alignment align, AllocT *objectAllocator, size_t poolSize, SpaceType spaceType, HeapSpace *heapSpace) AddPoolsAndAlloc() argument
|
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/types/ |
H A D | ets_array.h | 97 static T *Create(EtsClass *arrayClass, uint32_t length, SpaceType spaceType = SpaceType::SPACE_TYPE_OBJECT, in Create() 101 coretypes::Array::Create(arrayClass->GetRuntimeClass(), length, spaceType, pinned)); in Create() 123 ark::SpaceType spaceType = ark::SpaceType::SPACE_TYPE_OBJECT) in Create() 133 return EtsArray::Create<EtsTypedObjectArray>(arrayClass, length, spaceType); in Create() 229 static EtsPrimitiveArray *Create(uint32_t length, SpaceType spaceType = SpaceType::SPACE_TYPE_OBJECT, in Create() 233 return EtsArray::Create<EtsPrimitiveArray>(GetComponentClass(), length, spaceType, pinned); in Create()
|
/arkcompiler/ets_runtime/ecmascript/tests/ |
H A D | incremental_marking_test.cpp | 41 JSHandle<TaggedArray> CreateTaggedArray(uint32_t length, JSTaggedValue initVal, MemSpaceType spaceType) in CreateTaggedArray() argument 44 return factory->NewTaggedArray(length, initVal, spaceType); in CreateTaggedArray()
|
/arkcompiler/runtime_core/static_core/runtime/tests/ |
H A D | test_utils.h | 59 SpaceType spaceType = SpaceType::SPACE_TYPE_OBJECT; in AllocArray() local 62 spaceType = SpaceType::SPACE_TYPE_NON_MOVABLE_OBJECT; in AllocArray() 64 return coretypes::Array::Create(klass, length, spaceType, pinned); in AllocArray()
|
H A D | static_analyzer_test.cpp | 75 SpaceType spaceType = SpaceType::SPACE_TYPE_OBJECT; in AllocStringArray() local 78 return coretypes::Array::Create(klass, length, spaceType); in AllocStringArray()
|
/arkcompiler/runtime_core/static_core/libpandabase/tests/ |
H A D | pool_map_test.cpp | 50 void AddToPoolMap(Pool pool, SpaceType spaceType, AllocatorType allocatorType, void *allocatorAddr = nullptr) in AddToPoolMap() argument 56 poolMap_.AddPoolToMap(pool.GetMem(), pool.GetSize(), spaceType, allocatorType, allocatorAddr); in AddToPoolMap() 100 void CheckRandomPoolAddress(Pool pool, SpaceType spaceType, AllocatorType allocatorType, uintptr_t allocatorAddr) in CheckRandomPoolAddress() argument 103 ASSERT_EQ(GetSpaceTypeForAddr(poolAddr), spaceType); in CheckRandomPoolAddress() local
|
/arkcompiler/ets_runtime/ecmascript/mem/ |
H A D | region.h | 158 RegionSpaceFlag spaceType, RegionTypeFlag typeFlag) in Region() 159 : packedData_(begin, end, spaceType, typeFlag), in Region() 174 RegionSpaceFlag spaceType) in Region() 175 : packedData_(allocateBase, spaceType), // no markGCBitset_ for JitFort in Region() 862 inline PackedData(uintptr_t begin, uintptr_t end, RegionSpaceFlag spaceType, RegionTypeFlag typeFlag) in PackedData() 864 flags_.spaceFlag_ = spaceType; in PackedData() 867 bitsetSize_ = (spaceType == RegionSpaceFlag::IN_HUGE_OBJECT_SPACE || in PackedData() 868 spaceType == RegionSpaceFlag::IN_HUGE_MACHINE_CODE_SPACE || in PackedData() 869 spaceType == RegionSpaceFlag::IN_SHARED_HUGE_OBJECT_SPACE) ? in PackedData() 880 inline PackedData(uintptr_t begin, RegionSpaceFlag spaceType) in PackedData() 157 Region(NativeAreaAllocator *allocator, uintptr_t allocateBase, uintptr_t begin, uintptr_t end, RegionSpaceFlag spaceType, RegionTypeFlag typeFlag) Region() argument 173 Region(NativeAreaAllocator *allocator, uintptr_t allocateBase, uintptr_t end, RegionSpaceFlag spaceType) Region() argument [all...] |
H A D | space.cpp | 24 MemSpaceType spaceType, size_t initialCapacity, in Space() 28 spaceType_(spaceType), in Space() 98 size_t initialCapacity, size_t maximumCapacity, MemSpaceType spaceType) in HugeObjectSpace() 99 : Space(heap, heapRegionAllocator, spaceType, initialCapacity, maximumCapacity) in HugeObjectSpace() 23 Space(BaseHeap* heap, HeapRegionAllocator *heapRegionAllocator, MemSpaceType spaceType, size_t initialCapacity, size_t maximumCapacity) Space() argument 97 HugeObjectSpace(Heap *heap, HeapRegionAllocator *heapRegionAllocator, size_t initialCapacity, size_t maximumCapacity, MemSpaceType spaceType) HugeObjectSpace() argument
|
/arkcompiler/ets_runtime/ecmascript/compiler/ |
H A D | new_object_stub_builder.h | 73 RegionSpaceFlag spaceType = RegionSpaceFlag::IN_YOUNG_SPACE);
75 RegionSpaceFlag spaceType = RegionSpaceFlag::IN_YOUNG_SPACE);
77 RegionSpaceFlag spaceType = RegionSpaceFlag::IN_YOUNG_SPACE, bool isMutantArray = false);
79 RegionSpaceFlag spaceType = RegionSpaceFlag::IN_YOUNG_SPACE);
105 void HeapAlloc(Variable *result, Label *exit, RegionSpaceFlag spaceType, GateRef hclass);
106 void NewJSArrayLiteral(Variable *result, Label *exit, RegionSpaceFlag spaceType, GateRef obj, GateRef hclass,
|
/arkcompiler/runtime_core/static_core/runtime/include/coretypes/ |
H A D | array.h | 59 ark::SpaceType spaceType = ark::SpaceType::SPACE_TYPE_OBJECT, 63 ark::SpaceType spaceType = ark::SpaceType::SPACE_TYPE_OBJECT, 67 ark::SpaceType spaceType = ark::SpaceType::SPACE_TYPE_OBJECT, 71 ark::SpaceType spaceType = ark::SpaceType::SPACE_TYPE_OBJECT,
|