Home
last modified time | relevance | path

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

/arkcompiler/ets_runtime/ecmascript/mem/
Dchunk.cpp40 size_t newSize; in Expand() local
43 newSize = size + (head->GetSize() << 1); in Expand()
45 newSize = sizeof(Area) + MEM_ALIGN + size; in Expand()
48 if (newSize < MIN_CHUNK_AREA_SIZE) { in Expand()
49 newSize = MIN_CHUNK_AREA_SIZE; in Expand()
50 } else if (newSize > MAX_CHUNK_AREA_SIZE) { in Expand()
52 newSize = std::max(minNewSize, MAX_CHUNK_AREA_SIZE); in Expand()
55 if (newSize > static_cast<size_t>(std::numeric_limits<int>::max())) { in Expand()
56 LOG_ECMA_MEM(FATAL) << "OOM chunk : newSize is "<< newSize << ", size is " << size; in Expand()
60 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.h124 size_t newSize = (*it).second.GetSize(); in MergeList() local
129 auto next = reinterpret_cast<void *>(reinterpret_cast<uintptr_t>(startMem) + newSize); in MergeList()
131 newSize += (*it).second.GetSize(); in MergeList()
133 next = reinterpret_cast<void *>(reinterpret_cast<uintptr_t>(startMem) + newSize); in MergeList()
138 freeList_.emplace(newSize, MemMap(startMem, newSize)); in MergeList()
Ddyn_chunk.h40 int Expand(size_t newSize);
/arkcompiler/ets_runtime/ecmascript/
Dtagged_hash_table.h58 int newSize = static_cast<int>(helpers::math::GetPowerOfTwoValue32(rawSize)); in ComputeHashTableSize() local
59 return (newSize > MIN_SIZE) ? newSize : MIN_SIZE; in ComputeHashTableSize()
77 …int newSize = Derived::ComputeCompactSize(table, ComputeHashTableSize(table->Size() + numOfAddedEl… variable
79 newSize = std::max(newSize, MIN_SHRINK_SIZE);
80 int length = Derived::GetEntryIndex(newSize);
82 newTable->SetHashTableSize(thread, newSize);
138 int newSize = ComputeHashTableSize(atLeastSize); in RecalculateTableSize() local
139 ASSERT_PRINT(newSize > atLeastSize, "new size must greater than atLeastSize"); in RecalculateTableSize()
141 if (newSize < MIN_SHRINK_SIZE) { in RecalculateTableSize()
144 return newSize; in RecalculateTableSize()
[all …]
Djs_serializer.cpp182 size_t newSize = oldSize + bytes; in AllocateBuffer() local
183 if (newSize > sizeLimit_) { in AllocateBuffer()
205 if (newSize > bufferCapacity_) { in AllocateBuffer()
206 if (!ExpandBuffer(newSize)) { in AllocateBuffer()
Djs_object.cpp191 uint32_t newSize = receiver->GetClass()->GetObjectSize(); in TransitionToDictionary() local
193 …factory->FillFreeObject(ToUintPtr(*receiver) + newSize, trimBytes, RemoveSlots::YES, ToUintPtr(*re… in TransitionToDictionary()
/arkcompiler/ets_runtime/ecmascript/tests/
Dgc_test.cpp330 size_t newSize = originalHeapSize; in HWTEST_F_L0() local
337 newSize = thread->GetEcmaVM()->GetHeap()->GetCommittedSize(); in HWTEST_F_L0()
339 EXPECT_TRUE(newSize > originalHeapSize); in HWTEST_F_L0()
345 ASSERT_TRUE(thread->GetEcmaVM()->GetHeap()->GetCommittedSize() < newSize); in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/js_api/
Djs_api_vector.cpp62 void JSAPIVector::SetLength(JSThread *thread, const JSHandle<JSAPIVector> &vector, uint32_t newSize) in SetLength() argument
65 if (newSize > len) { in SetLength()
66 GrowCapacity(thread, vector, newSize); in SetLength()
68 vector->SetLength(newSize); in SetLength()
Djs_api_vector.h37 static void SetLength(JSThread *thread, const JSHandle<JSAPIVector> &vector, uint32_t newSize);
/arkcompiler/ets_runtime/ecmascript/compiler/aot_file/
Daot_file_manager.h151 … static bool RewriteDataSection(uintptr_t dataSec, size_t size, uintptr_t newData, size_t newSize);
Daot_file_manager.cpp314 …TFileManager::RewriteDataSection(uintptr_t dataSec, size_t size, uintptr_t newData, size_t newSize) in RewriteDataSection() argument
316 …py_s(reinterpret_cast<void *>(dataSec), size, reinterpret_cast<void *>(newData), newSize) != EOK) { in RewriteDataSection()
/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()