Home
last modified time | relevance | path

Searched refs:newSize (Results 1 - 25 of 30) sorted by relevance

12

/arkcompiler/ets_runtime/ecmascript/mem/
H A 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()
[all...]
H A Dchunk.cpp42 size_t newSize; in Expand() local
45 newSize = size + (head->GetSize() << 1); in Expand()
47 newSize = sizeof(Area) + MEM_ALIGN + size; in Expand()
50 if (newSize < MIN_CHUNK_AREA_SIZE) { in Expand()
51 newSize = MIN_CHUNK_AREA_SIZE; in Expand()
52 } else if (newSize > MAX_CHUNK_AREA_SIZE) { in Expand()
54 newSize = std::max(minNewSize, MAX_CHUNK_AREA_SIZE); in Expand()
57 if (newSize > static_cast<size_t>(std::numeric_limits<int>::max())) { // LOCV_EXCL_BR_LINE in Expand()
58 LOG_ECMA_MEM(FATAL) << "OOM chunk : newSize is "<< newSize << ", siz in Expand()
[all...]
H A 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()
H A Ddyn_chunk.h41 int Expand(size_t newSize);
/arkcompiler/runtime_core/static_core/runtime/regexp/ecmascript/mem/
H A 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()
H A Ddyn_chunk.h60 int Expand(size_t newSize);
/arkcompiler/ets_runtime/ecmascript/tests/
H A Dgc_third_test.cpp51 auto getSizeAfterCreateAndCallHintGC = [this, heap] (size_t &newSize, size_t &finalSize) -> bool { in HWTEST_F_L0()
58 newSize = heap->GetCommittedSize(); in HWTEST_F_L0()
75 size_t newSize = 0; in HWTEST_F_L0() local
77 bool res = getSizeAfterCreateAndCallHintGC(newSize, finalSize); in HWTEST_F_L0()
79 EXPECT_TRUE(newSize > originSize); in HWTEST_F_L0()
80 EXPECT_TRUE(finalSize == newSize); in HWTEST_F_L0()
86 size_t newSize = 0; in HWTEST_F_L0() local
88 bool res = getSizeAfterCreateAndCallHintGC(newSize, finalSize); in HWTEST_F_L0()
90 EXPECT_TRUE(newSize > originSize); in HWTEST_F_L0()
91 EXPECT_TRUE(finalSize < newSize); in HWTEST_F_L0()
[all...]
H A Dgc_second_test.cpp76 size_t newSize = originalHeapSize; in HWTEST_F_L0() local
83 newSize = thread->GetEcmaVM()->GetHeap()->GetCommittedSize(); in HWTEST_F_L0()
85 EXPECT_TRUE(newSize > originalHeapSize); in HWTEST_F_L0()
91 ASSERT_TRUE(thread->GetEcmaVM()->GetHeap()->GetCommittedSize() < newSize); in HWTEST_F_L0()
110 size_t newSize = EcmaTestCommon::GcCommonCase(thread); in HWTEST_F_L0() local
112 EXPECT_TRUE(expandHeapSize > newSize); in HWTEST_F_L0()
130 size_t newSize = EcmaTestCommon::GcCommonCase(thread); in HWTEST_F_L0() local
132 EXPECT_TRUE(expandHeapSize > newSize); in HWTEST_F_L0()
/arkcompiler/runtime_core/static_core/libpandabase/mem/
H A 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 nothing"; in Resize()
123 size_t bytesToDelete = curSize - newSize; in Resize()
H A 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()
H A 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()
H A Darena.h99 void Resize(size_t newSize);
/arkcompiler/ets_runtime/ecmascript/
H A Dtagged_hash_table.h61 int newSize = static_cast<int>(helpers::math::GetPowerOfTwoValue32(rawSize)); in ComputeHashTableSize() local
62 return (newSize > MIN_SIZE) ? newSize : MIN_SIZE; in ComputeHashTableSize()
82 int newSize = Derived::ComputeCompactSize(table, ComputeHashTableSize(table->Size() + numOfAddedElements), in GrowHashTable() local
84 newSize = std::max(newSize, MIN_SHRINK_SIZE); in GrowHashTable()
85 int length = Derived::GetEntryIndex(newSize); in GrowHashTable()
89 newTable->SetHashTableSize(thread, newSize); in GrowHashTable()
148 int newSize = ComputeHashTableSize(atLeastSize); in RecalculateTableSize() local
149 ASSERT_PRINT(newSize > atLeastSiz in RecalculateTableSize()
159 int newSize = RecalculateTableSize(table->Size(), table->EntriesCount() + additionalSize); Shrink() local
[all...]
/arkcompiler/ets_runtime/ecmascript/serializer/
H A Dserialize_data.h145 size_t newSize = oldSize + bytes; in AllocateBuffer() local
146 if (newSize > sizeLimit_) { in AllocateBuffer()
168 if (newSize > bufferCapacity_) { in AllocateBuffer()
169 if (!ExpandBuffer(newSize)) { in AllocateBuffer()
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/mempool/src/
H A Dmempool.cpp177 void *MemPool::Realloc(const void *ptr, size_t oldSize, size_t newSize) in Realloc() argument
179 void *result = Malloc(newSize); in Realloc()
181 size_t copySize = ((newSize > oldSize) ? oldSize : newSize); in Realloc()
/arkcompiler/ets_runtime/ecmascript/js_api/
H A Djs_api_bitvector.cpp414 void JSAPIBitVector::Resize(JSThread* thread, const JSHandle<JSAPIBitVector>& bitVector, int newSize) in Resize() argument
416 if (newSize < 0) { in Resize()
418 oss << "The value of \"length\" is out of range. It must be >= 0" << ". Received value is: " << newSize; in Resize() local
426 uint32_t newElementsLength = static_cast<uint32_t>((newSize - 1) / BIT_SET_LENGTH + 1); in Resize()
430 if (elementsLength == newElementsLength && length < newSize) { in Resize()
431 for (int32_t index = length; index < newSize; index++) { in Resize()
440 bitVector->SetLength(newSize); in Resize()
H A Djs_api_vector.cpp60 void JSAPIVector::SetLength(JSThread *thread, const JSHandle<JSAPIVector> &vector, uint32_t newSize) in SetLength() argument
63 if (newSize > len) { in SetLength()
64 GrowCapacity(thread, vector, newSize); in SetLength()
66 vector->SetLength(newSize); in SetLength()
H A Djs_api_vector.h37 static void SetLength(JSThread *thread, const JSHandle<JSAPIVector> &vector, uint32_t newSize);
/arkcompiler/runtime_core/static_core/static_linker/
H A Dlinker_code_parser_context.cpp92 const auto newSize = changes_.size(); in Devour() local
95 ranges_.emplace_back(oldSize, newSize); in Devour()
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_be/include/cg/
H A Dinsn.h147 void ResizeOpnds(uint32 newSize)
149 opnds.resize(static_cast<std::size_t>(newSize));
/arkcompiler/ets_runtime/ecmascript/compiler/aot_file/
H A Daot_file_manager.h192 static bool RewriteDataSection(uintptr_t dataSec, size_t size, uintptr_t newData, size_t newSize);
H A Daot_file_manager.cpp501 bool AOTFileManager::RewriteDataSection(uintptr_t dataSec, size_t size, uintptr_t newData, size_t newSize) in RewriteDataSection() argument
503 if (memcpy_s(reinterpret_cast<void *>(dataSec), size, reinterpret_cast<void *>(newData), newSize) != EOK) { in RewriteDataSection()
/arkcompiler/ets_runtime/ecmascript/containers/
H A Dcontainers_vector.cpp110 JSHandle<JSTaggedValue> newSize = GetCallArg(argv, 0); in SetLength() local
111 if (!newSize->IsNumber()) { in SetLength()
114 if (newSize->GetNumber() < 0) { in SetLength()
117 JSAPIVector::SetLength(thread, JSHandle<JSAPIVector>::Cast(self), JSTaggedValue::ToUint32(thread, newSize)); in SetLength()
/arkcompiler/runtime_core/static_core/compiler/optimizer/optimizations/
H A Dreserve_string_builder_buffer.cpp166 auto newSize = GetGraph()->FindOrCreateConstant(appendCallsCount); in ReplaceInitialBufferSizeConstantInlined() local
169 newArray->SetInput(1, newSize); in ReplaceInitialBufferSizeConstantInlined()
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/mempool/include/
H A Dmempool.h174 void *Realloc(const void *ptr, size_t oldSize, size_t newSize);

Completed in 17 milliseconds

12