Home
last modified time | relevance | path

Searched refs:newSize (Results 1 – 25 of 29) sorted by relevance

12

/arkcompiler/ets_runtime/ecmascript/mem/
Dchunk.cpp41 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()
Ddyn_chunk.cpp21 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()
Dmem_map_allocator.h176 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()
Ddyn_chunk.h41 int Expand(size_t newSize);
/arkcompiler/runtime_core/static_core/runtime/regexp/ecmascript/mem/
Ddyn_chunk.cpp21 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()
Ddyn_chunk.h60 int Expand(size_t newSize);
/arkcompiler/ets_runtime/ecmascript/tests/
Dgc_third_test.cpp86 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 …]
Dgc_second_test.cpp141 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/
Dtagged_hash_table.h60 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/
Darena_allocator.h115 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()
Darena_allocator.cpp113 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()
Darena-inl.h129 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()
Darena.h99 void Resize(size_t newSize);
/arkcompiler/ets_runtime/ecmascript/serializer/
Dserialize_data.h122 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/
Dmempool.cpp176 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/
D0002-Add-Panda-Allocator.patch175 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/
Djs_api_vector.cpp63 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()
Djs_api_vector.h37 static void SetLength(JSThread *thread, const JSHandle<JSAPIVector> &vector, uint32_t newSize);
/arkcompiler/runtime_core/static_core/static_linker/
Dlinker_code_parser_context.cpp82 const auto newSize = changes_.size(); in Devour() local
85 ranges_.emplace_back(oldSize, newSize); in Devour()
/arkcompiler/ets_runtime/ecmascript/compiler/aot_file/
Daot_file_manager.h176 … static bool RewriteDataSection(uintptr_t dataSec, size_t size, uintptr_t newData, size_t newSize);
Daot_file_manager.cpp391 …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/
Dinsn.h127 void ResizeOpnds(uint32 newSize) in ResizeOpnds() argument
129 opnds.resize(static_cast<std::size_t>(newSize)); in ResizeOpnds()
/arkcompiler/ets_runtime/ecmascript/containers/
Dcontainers_vector.cpp115 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/
Dmempool.h168 void *Realloc(const void *ptr, size_t oldSize, size_t newSize);
/arkcompiler/ets_runtime/ecmascript/pgo_profiler/
Dpgo_profiler.h85 void UpdateTrackArrayLength(JSTaggedValue trackInfoVal, uint32_t newSize);

12