/arkcompiler/ets_runtime/ecmascript/mem/ |
D | chunk.cpp | 41 size_t newSize; in Expand() local 44 newSize = size + (head->GetSize() << 1); in Expand() 46 newSize = sizeof(Area) + MEM_ALIGN + size; in Expand() 49 if (newSize < MIN_CHUNK_AREA_SIZE) { in Expand() 50 newSize = MIN_CHUNK_AREA_SIZE; in Expand() 51 } else if (newSize > MAX_CHUNK_AREA_SIZE) { in Expand() 53 newSize = std::max(minNewSize, MAX_CHUNK_AREA_SIZE); in Expand() 56 if (newSize > static_cast<size_t>(std::numeric_limits<int>::max())) { in Expand() 57 LOG_ECMA_MEM(FATAL) << "OOM chunk : newSize is "<< newSize << ", size is " << size; in Expand() 61 Area *area = NewArea(newSize); in Expand()
|
D | dyn_chunk.cpp | 21 int DynChunk::Expand(size_t newSize) in Expand() argument 23 if (newSize > allocatedSize_) { in Expand() 29 if (size > newSize) { in Expand() 30 newSize = size; in Expand() 32 newSize = std::max(newSize, ALLOCATE_MIN_SIZE); in Expand() 33 auto *newBuf = chunk_->NewArray<uint8_t>(newSize); in Expand() 38 if (memset_s(newBuf, newSize, 0, newSize) != EOK) { in Expand() 49 allocatedSize_ = newSize; in Expand()
|
D | mem_map_allocator.h | 176 size_t newSize = (*it).second.GetSize(); in MergeList() local 181 auto next = reinterpret_cast<void *>(reinterpret_cast<uintptr_t>(startMem) + newSize); in MergeList() 183 newSize += (*it).second.GetSize(); in MergeList() 185 next = reinterpret_cast<void *>(reinterpret_cast<uintptr_t>(startMem) + newSize); in MergeList() 190 freeList_.emplace(newSize, MemMap(startMem, newSize)); in MergeList()
|
D | dyn_chunk.h | 41 int Expand(size_t newSize);
|
/arkcompiler/runtime_core/static_core/runtime/regexp/ecmascript/mem/ |
D | dyn_chunk.cpp | 21 int DynChunk::Expand(size_t newSize) in Expand() argument 23 if (newSize > allocatedSize_) { in Expand() 29 newSize = std::max({size, newSize, ALLOCATE_MIN_SIZE}); in Expand() 31 auto *newBuf = Runtime::GetCurrent()->GetInternalAllocator()->New<uint8_t[]>(newSize); in Expand() 36 if (memset_s(newBuf, newSize, 0, newSize) != EOK) { in Expand() 48 allocatedSize_ = newSize; in Expand()
|
D | dyn_chunk.h | 60 int Expand(size_t newSize);
|
/arkcompiler/ets_runtime/ecmascript/tests/ |
D | gc_third_test.cpp | 86 size_t newSize = thread->GetEcmaVM()->GetHeap()->GetCommittedSize(); in HWTEST_F_L0() local 88 EXPECT_TRUE(expandHeapSize > newSize); in HWTEST_F_L0() 146 … auto getSizeAfterCreateAndCallHintGC = [this, heap] (size_t &newSize, size_t &finalSize) -> bool { in HWTEST_F_L0() argument 153 newSize = heap->GetCommittedSize(); in HWTEST_F_L0() 169 size_t newSize = 0; in HWTEST_F_L0() local 171 bool res = getSizeAfterCreateAndCallHintGC(newSize, finalSize); in HWTEST_F_L0() 173 EXPECT_TRUE(newSize > originSize); in HWTEST_F_L0() 174 EXPECT_TRUE(finalSize == newSize); in HWTEST_F_L0() 182 size_t newSize = 0; in HWTEST_F_L0() local 184 bool res = getSizeAfterCreateAndCallHintGC(newSize, finalSize); in HWTEST_F_L0() [all …]
|
D | gc_second_test.cpp | 141 size_t newSize = originalHeapSize; in HWTEST_F_L0() local 148 newSize = thread->GetEcmaVM()->GetHeap()->GetCommittedSize(); in HWTEST_F_L0() 150 EXPECT_TRUE(newSize > originalHeapSize); in HWTEST_F_L0() 156 ASSERT_TRUE(thread->GetEcmaVM()->GetHeap()->GetCommittedSize() < newSize); in HWTEST_F_L0() 182 size_t newSize = thread->GetEcmaVM()->GetHeap()->GetCommittedSize(); in HWTEST_F_L0() local 184 EXPECT_TRUE(expandHeapSize > newSize); in HWTEST_F_L0()
|
/arkcompiler/ets_runtime/ecmascript/ |
D | tagged_hash_table.h | 60 int newSize = static_cast<int>(helpers::math::GetPowerOfTwoValue32(rawSize)); in ComputeHashTableSize() local 61 return (newSize > MIN_SIZE) ? newSize : MIN_SIZE; in ComputeHashTableSize() 79 …int newSize = Derived::ComputeCompactSize(table, ComputeHashTableSize(table->Size() + numOfAddedEl… variable 81 newSize = std::max(newSize, MIN_SHRINK_SIZE); 82 int length = Derived::GetEntryIndex(newSize); 84 newTable->SetHashTableSize(thread, newSize); 140 int newSize = ComputeHashTableSize(atLeastSize); in RecalculateTableSize() local 141 ASSERT_PRINT(newSize > atLeastSize, "new size must greater than atLeastSize"); in RecalculateTableSize() 143 if (newSize < MIN_SHRINK_SIZE) { in RecalculateTableSize() 146 return newSize; in RecalculateTableSize() [all …]
|
/arkcompiler/runtime_core/static_core/libpandabase/mem/ |
D | arena_allocator.h | 115 PANDA_PUBLIC_API void Resize(size_t newSize); 150 void Resize(size_t newSize) in Resize() argument 152 ASSERT(newSize <= GetOccupiedSize()); in Resize() 153 curPos_ = static_cast<char *>(ToVoidPtr(ToUintPtr(&buff_[0]) + newSize)); in Resize() 174 void Resize(size_t newSize) in Resize() argument 176 (void)newSize; in Resize()
|
D | arena_allocator.cpp | 113 void ArenaAllocatorT<USE_OOM_HANDLER>::Resize(size_t newSize) in Resize() argument 115 LOG(DEBUG, ALLOC) << "ArenaAllocator: resize to new size " << newSize; in Resize() 118 if (curSize <= newSize) { in Resize() 119 …LOG_IF(curSize < newSize, FATAL, ALLOC) << "ArenaAllocator: resize to bigger size than we have. Do… in Resize() 123 size_t bytesToDelete = curSize - newSize; in Resize()
|
D | arena-inl.h | 129 inline void Arena::Resize(size_t newSize) in Resize() argument 132 ASSERT(newSize <= oldSize); in Resize() 133 curPos_ = ToVoidPtr(ToUintPtr(GetStartPos()) + newSize); in Resize() 134 ASAN_POISON_MEMORY_REGION(curPos_, oldSize - newSize); in Resize()
|
D | arena.h | 99 void Resize(size_t newSize);
|
/arkcompiler/ets_runtime/ecmascript/serializer/ |
D | serialize_data.h | 122 size_t newSize = oldSize + bytes; in AllocateBuffer() local 123 if (newSize > sizeLimit_) { in AllocateBuffer() 145 if (newSize > bufferCapacity_) { in AllocateBuffer() 146 if (!ExpandBuffer(newSize)) { in AllocateBuffer()
|
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/mempool/src/ |
D | mempool.cpp | 176 void *MemPool::Realloc(const void *ptr, size_t oldSize, size_t newSize) in Realloc() argument 178 void *result = Malloc(newSize); in Realloc() 180 size_t copySize = ((newSize > oldSize) ? oldSize : newSize); in Realloc()
|
/arkcompiler/runtime_core/static_core/patches/asmjit/ |
D | 0002-Add-Panda-Allocator.patch | 175 if (ASMJIT_UNLIKELY(newSize > SIZE_MAX - kBlockSize - blockAlignmentOverhead)) 180 // Allocate new block - we add alignment overhead to `newSize`, which becomes the 183 newSize += blockAlignmentOverhead; 184 - Block* newBlock = static_cast<Block*>(::malloc(newSize + kBlockSize)); 185 + Block* newBlock = static_cast<Block*>(_pandaAllocator->Alloc(newSize + kBlockSize));
|
/arkcompiler/ets_runtime/ecmascript/js_api/ |
D | js_api_vector.cpp | 63 void JSAPIVector::SetLength(JSThread *thread, const JSHandle<JSAPIVector> &vector, uint32_t newSize) in SetLength() argument 66 if (newSize > len) { in SetLength() 67 GrowCapacity(thread, vector, newSize); in SetLength() 69 vector->SetLength(newSize); in SetLength()
|
D | js_api_vector.h | 37 static void SetLength(JSThread *thread, const JSHandle<JSAPIVector> &vector, uint32_t newSize);
|
/arkcompiler/runtime_core/static_core/static_linker/ |
D | linker_code_parser_context.cpp | 82 const auto newSize = changes_.size(); in Devour() local 85 ranges_.emplace_back(oldSize, newSize); in Devour()
|
/arkcompiler/ets_runtime/ecmascript/compiler/aot_file/ |
D | aot_file_manager.h | 176 … static bool RewriteDataSection(uintptr_t dataSec, size_t size, uintptr_t newData, size_t newSize);
|
D | aot_file_manager.cpp | 391 …TFileManager::RewriteDataSection(uintptr_t dataSec, size_t size, uintptr_t newData, size_t newSize) in RewriteDataSection() argument 393 …py_s(reinterpret_cast<void *>(dataSec), size, reinterpret_cast<void *>(newData), newSize) != EOK) { in RewriteDataSection()
|
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_be/include/cg/ |
D | insn.h | 127 void ResizeOpnds(uint32 newSize) in ResizeOpnds() argument 129 opnds.resize(static_cast<std::size_t>(newSize)); in ResizeOpnds()
|
/arkcompiler/ets_runtime/ecmascript/containers/ |
D | containers_vector.cpp | 115 JSHandle<JSTaggedValue> newSize = GetCallArg(argv, 0); in SetLength() local 116 if (!newSize->IsNumber()) { in SetLength() 119 if (newSize->GetNumber() < 0) { in SetLength() 122 …or::SetLength(thread, JSHandle<JSAPIVector>::Cast(self), JSTaggedValue::ToUint32(thread, newSize)); in SetLength()
|
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/mempool/include/ |
D | mempool.h | 168 void *Realloc(const void *ptr, size_t oldSize, size_t newSize);
|
/arkcompiler/ets_runtime/ecmascript/pgo_profiler/ |
D | pgo_profiler.h | 85 void UpdateTrackArrayLength(JSTaggedValue trackInfoVal, uint32_t newSize);
|