Home
last modified time | relevance | path

Searched full:size (Results 1 – 25 of 2884) sorted by relevance

12345678910>>...116

/arkcompiler/ets_runtime/ecmascript/mem/
Dnative_area_allocator.cpp29 LOG_ECMA_MEM(FATAL) << "capacity must have a size not less than sizeof Area."; in AllocateArea()
40 LOG_ECMA_MEM(FATAL) << "malloc failed, current alloc size = " << capacity in AllocateArea()
41 … << ", total allocated size = " << nativeMemoryUsage_.load(std::memory_order_relaxed); in AllocateArea()
66 auto size = area->GetSize() + sizeof(Area); in FreeArea() local
67 DecreaseNativeMemoryUsage(size); in FreeArea()
69 if (memset_s(area, size, INVALID_VALUE, size) != EOK) { // LOCV_EXCL_BR_LINE in FreeArea()
78 void NativeAreaAllocator::Free(void *mem, size_t size) in Free() argument
83 DecreaseNativeMemoryUsage(size); in Free()
85 if (memset_s(mem, size, INVALID_VALUE, size) != EOK) { // LOCV_EXCL_BR_LINE in Free()
94 void *NativeAreaAllocator::AllocateBuffer(size_t size) in AllocateBuffer() argument
[all …]
Dheap-inl.h39 #define CHECK_OBJ_AND_THROW_OOM_ERROR(object, size, space, message) … argument
48 …ThrowOutOfMemoryError(GetJSThread(), size, message); …
49 …(object) = reinterpret_cast<TaggedObject *>((space)->Allocate(size)); …
52 #define CHECK_SOBJ_AND_THROW_OOM_ERROR(thread, object, size, space, message) … argument
57 …ThrowOutOfMemoryError(thread, size, message); …
58 …(object) = reinterpret_cast<TaggedObject *>((space)->Allocate(thread, size)); …
61 #define CHECK_MACHINE_CODE_OBJ_AND_SET_OOM_ERROR_FORT(object, size, space, desc, message) … argument
66 …SetMachineCodeOutOfMemoryError(GetJSThread(), size, message); …
67 …(object) = reinterpret_cast<TaggedObject *>((space)->Allocate(size, desc)); …
70 #define CHECK_MACHINE_CODE_OBJ_AND_SET_OOM_ERROR(object, size, space, message) … argument
[all …]
Dtlab_allocator-inl.h47 uintptr_t TlabAllocator::Allocate(size_t size, MemSpaceType space) in Allocate() argument
52 result = AllocateInYoungSpace(size); in Allocate()
55 result = AllocateInOldSpace(size); in Allocate()
58 result = AllocateInCompressSpace(size); in Allocate()
67 uintptr_t TlabAllocator::AllocateInYoungSpace(size_t size) in AllocateInYoungSpace() argument
69 ASSERT(AlignUp(size, static_cast<size_t>(MemAlignment::MEM_ALIGN_OBJECT)) == size); in AllocateInYoungSpace()
70 if (UNLIKELY(size > SMALL_OBJECT_SIZE)) { in AllocateInYoungSpace()
71 uintptr_t address = heap_->AllocateYoungSync(size); in AllocateInYoungSpace()
74 uintptr_t result = youngAllocator_.Allocate(size); in AllocateInYoungSpace()
82 return youngAllocator_.Allocate(size); in AllocateInYoungSpace()
[all …]
Dsparse_space.h24 #define CHECK_OBJECT_AND_INC_OBJ_SIZE(size) \ argument
26 IncreaseLiveObjectSize(size); \
28 Region::ObjectAddressToRange(object)->IncreaseAliveObject(size); \
30 InvokeAllocationInspector(object, size, size); \
34 #define CHECK_OBJECT_AND_INC_OBJ_SIZE(size) \ argument
36 IncreaseLiveObjectSize(size); \
38 Region::ObjectAddressToRange(object)->IncreaseAliveObject(size); \
68 uintptr_t Allocate(size_t size, bool allowGC = true);
85 Region *TryToGetSuitableSweptRegion(size_t size);
98 void IncreaseAllocatedSize(size_t size);
[all …]
/arkcompiler/runtime_core/static_core/libpandabase/os/
Dmem.h43 PANDA_PUBLIC_API void MmapDeleter(std::byte *ptr, size_t size) noexcept;
46 * @brief Make memory region @param mem with size @param size with protection flags @param prot
47 * @param mem Pointer to memory region (should be aligned to page size)
48 * @param size Size of memory region
52 std::optional<Error> MakeMemWithProtFlag(void *mem, size_t size, int prot);
55 * @brief Make memory region @param mem with size @param size readable and executable
56 * @param mem Pointer to memory region (should be aligned to page size)
57 * @param size Size of memory region
60 std::optional<Error> MakeMemReadExec(void *mem, size_t size);
63 * @brief Make memory region @param mem with size @param size readable and writable
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_ir/include/
Dmir_pragma.h44 kValueShort = 0x02, // size - 1 (0…1) ubyte[size]
45 kValueChar = 0x03, // size - 1 (0…1) ubyte[size]
46 kValueInt = 0x04, // size - 1 (0…3) ubyte[size]
47 kValueLong = 0x06, // size - 1 (0…7) ubyte[size]
48 kValueFloat = 0x10, // size - 1 (0…3) ubyte[size]
49 kValueDouble = 0x11, // size - 1 (0…7) ubyte[size]
50 kValueMethodType = 0x15, // size - 1 (0…3) ubyte[size]
51 kValueMethodHandle = 0x16, // size - 1 (0…3) ubyte[size]
52 kValueString = 0x17, // size - 1 (0…3) ubyte[size]
53 kValueType = 0x18, // size - 1 (0…3) ubyte[size]
[all …]
/arkcompiler/ets_runtime/test/fuzztest/jsvaluereffoundationvalue_fuzzer/
Djsvaluereffoundationvalue_fuzzer.cpp27 void JSValueRefIsNumberValueFuzzTest(const uint8_t *data, size_t size) in JSValueRefIsNumberValueFuzzTest() argument
34 if (data == nullptr || size <= 0) { in JSValueRefIsNumberValueFuzzTest()
38 if (size > MAXBYTELEN) { in JSValueRefIsNumberValueFuzzTest()
39 size = MAXBYTELEN; in JSValueRefIsNumberValueFuzzTest()
41 if (memcpy_s(&key, MAXBYTELEN, data, size) != EOK) { in JSValueRefIsNumberValueFuzzTest()
46 if (memcpy_s(&inputUnit32, MAXBYTELEN, data, size) != EOK) { in JSValueRefIsNumberValueFuzzTest()
52 if (size == 0 || data == nullptr) { in JSValueRefIsNumberValueFuzzTest()
56 Local<StringRef> stringUtf8 = StringRef::NewFromUtf8(vm, (char *)data, (int)size); in JSValueRefIsNumberValueFuzzTest()
64 void JSValueRefIsStringValueFuzzTest(const uint8_t *data, size_t size) in JSValueRefIsStringValueFuzzTest() argument
69 if (data == nullptr || size <= 0) { in JSValueRefIsStringValueFuzzTest()
[all …]
/arkcompiler/ets_runtime/ecmascript/js_type_metadata/
Dsource_text_module_record.json7 "size": 8 number
12 "size": 8 number
17 "size": 8 number
22 "size": 8 number
27 "size": 8 number
32 "size": 8 number
37 "size": 8 number
42 "size": 8 number
47 "size": 8 number
52 "size": 8 number
[all …]
Djs_number_format.json7 "size": 8 number
12 "size": 8 number
17 "size": 8 number
22 "size": 8 number
27 "size": 8 number
32 "size": 8 number
37 "size": 8 number
42 "size": 8 number
47 "size": 8 number
52 "size": 8 number
[all …]
Dhclass.json1size": 8}, {"name": "Layout", "offset": 8, "size": 8}, {"name": "Transitions", "offset": 16, "size number
/arkcompiler/runtime_core/libpandabase/os/
Dmem.h41 void MmapDeleter(std::byte *ptr, size_t size) noexcept;
44 * \brief Make memory region \param mem with size \param size with protection flags \param prot
45 * @param mem Pointer to memory region (should be aligned to page size)
46 * @param size Size of memory region
50 std::optional<Error> MakeMemWithProtFlag(void *mem, size_t size, int prot);
53 * \brief Make memory region \param mem with size \param size readable and executable
54 * @param mem Pointer to memory region (should be aligned to page size)
55 * @param size Size of memory region
58 std::optional<Error> MakeMemReadExec(void *mem, size_t size);
61 * \brief Make memory region \param mem with size \param size readable and writable
[all …]
/arkcompiler/ets_runtime/ecmascript/tests/
Ddump_test.cpp214 for (int i = 0; i < loopVal.size(); i++) { in HWTEST_F_L0()
223 JSHandle<JSHClass> mapClass = factory->NewEcmaHClass(JSMap::SIZE, JSType::JS_MAP, proto); in NewJSMap()
235 JSHandle<JSHClass> mapClass = factory->NewSEcmaHClass(JSSharedMap::SIZE, 0, in NewJSSharedMap()
247 JSHandle<JSHClass> setClass = factory->NewEcmaHClass(JSSet::SIZE, JSType::JS_SET, proto); in NewJSSet()
259 JSHandle<JSHClass> setClass = factory->NewSEcmaHClass(JSSharedSet::SIZE, 0, in NewJSSharedSet()
273 …JSHandle<JSHClass> mapClass = factory->NewEcmaHClass(JSAPIHashMap::SIZE, JSType::JS_API_HASH_MAP, … in NewJSAPIHashMap()
284 …JSHandle<JSHClass> setClass = factory->NewEcmaHClass(JSAPIHashSet::SIZE, JSType::JS_API_HASH_SET, … in NewJSAPIHashSet()
295 …JSHandle<JSHClass> mapClass = factory->NewEcmaHClass(JSAPITreeMap::SIZE, JSType::JS_API_TREE_MAP, … in NewJSAPITreeMap()
306 …JSHandle<JSHClass> setClass = factory->NewEcmaHClass(JSAPITreeSet::SIZE, JSType::JS_API_TREE_SET, … in NewJSAPITreeSet()
317 …JSHandle<JSHClass> mapClass = factory->NewEcmaHClass(JSAPIPlainArray::SIZE, JSType::JS_API_PLAIN_A… in NewJSAPIPlainArray()
[all …]
/arkcompiler/runtime_core/static_core/verification/util/tests/
Dbit_vector_property_test.cpp43 if (bits.SetBitsCount() != indices.size()) { in IsEqual()
69 size_t size = (set.empty() ? 0 : *set.rbegin()) + inc; in arbitrary() local
70 BitVector bits {size}; in arbitrary()
99 void ClassifySize(const std::string &name, size_t size, const Intervals &intervals) in ClassifySize() argument
102 RC_CLASSIFY(i.Contains(size), name + " " + std::to_string(i)); in ClassifySize()
114 ClassifySize("Bits.size() in", bitset.bits.Size(), g_statIntervals); in Stat()
115 ClassifySize("Indices.size() in", bitset.indices.size(), g_statIntervals); in Stat()
119 StdSet Universum(size_t size) in Universum() argument
121 return ToSet<StdSet>(Interval(0, size - 1)); in Universum()
127 RC_ASSERT(bit_set.bits.SetBitsCount() == bit_set.indices.size());
[all …]
/arkcompiler/ets_runtime/test/fuzztest/objectgetinformation_fuzzer/
Dobjectgetinformation_fuzzer.cpp24 void ObjectGetAllPropertyNamesFuzzTest(const uint8_t *data, size_t size) in ObjectGetAllPropertyNamesFuzzTest() argument
29 if (data == nullptr || size <= 0) { in ObjectGetAllPropertyNamesFuzzTest()
35 if (size > maxByteLen1) { in ObjectGetAllPropertyNamesFuzzTest()
36 size = maxByteLen1; in ObjectGetAllPropertyNamesFuzzTest()
38 if (memcpy_s(&index, maxByteLen1, data, size) != EOK) { in ObjectGetAllPropertyNamesFuzzTest()
44 if (size > maxByteLen2) { in ObjectGetAllPropertyNamesFuzzTest()
45 size = maxByteLen2; in ObjectGetAllPropertyNamesFuzzTest()
47 if (memcpy_s(&filter, maxByteLen2, data, size) != EOK) { in ObjectGetAllPropertyNamesFuzzTest()
58 void ObjectGetNativePointerFieldCountFuzzTest(const uint8_t *data, size_t size) in ObjectGetNativePointerFieldCountFuzzTest() argument
63 if (data == nullptr || size <= 0) { in ObjectGetNativePointerFieldCountFuzzTest()
[all …]
/arkcompiler/ets_runtime/test/fuzztest/containerslinkedlistcommon_fuzzer/
Dcontainerslinkedlistcommon_fuzzer.h107 static void ContainersLinkedListAddFuzzTest(const uint8_t* data, size_t size) in ContainersLinkedListAddFuzzTest() argument
117 if (size <= 0) { in ContainersLinkedListAddFuzzTest()
120 if (size > MAXBYTELEN) { in ContainersLinkedListAddFuzzTest()
121 size = MAXBYTELEN; in ContainersLinkedListAddFuzzTest()
123 if (memcpy_s(&value, MAXBYTELEN, data, size) != 0) { in ContainersLinkedListAddFuzzTest()
132 static void ContainersLinkedListGetFirstFuzzTest(const uint8_t* data, size_t size) in ContainersLinkedListGetFirstFuzzTest() argument
142 if (size <= 0) { in ContainersLinkedListGetFirstFuzzTest()
145 if (size > MAXBYTELEN) { in ContainersLinkedListGetFirstFuzzTest()
146 size = MAXBYTELEN; in ContainersLinkedListGetFirstFuzzTest()
148 if (memcpy_s(&value, MAXBYTELEN, data, size) != 0) { in ContainersLinkedListGetFirstFuzzTest()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/checked/
Dets_string_builder_reserve_part30-44.sts22 //! INST_NOT "NewArray (size=1)"
24 //! INST "NewArray (size=1)"
28 //! INST_NOT "NewArray (size=2)"
30 //! INST "NewArray (size=2)"
34 //! INST_NOT "NewArray (size=1)"
36 //! INST_NOT "NewArray (size=1)"
40 //! INST_NOT "NewArray (size=1)"
42 //! INST_NOT "NewArray (size=1)"
46 //! INST_NOT "NewArray (size=1)"
48 //! INST_NOT "NewArray (size=1)"
[all …]
Dets_string_builder_reserve_part01-10.sts22 //! INST_NOT "NewArray (size=1)"
24 //! INST "NewArray (size=1)"
28 //! INST_NOT "NewArray (size=2)"
30 //! INST "NewArray (size=2)"
34 //! INST_NOT "NewArray (size=3)"
36 //! INST "NewArray (size=3)"
40 //! INST_NOT "NewArray (size=4)"
42 //! INST "NewArray (size=4)"
46 //! INST_NOT "NewArray (size=5)"
48 //! INST "NewArray (size=5)"
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/02.array_creation_expressions/
Dexpr.params.yaml17 let size = 1 // identity dimension conversion
18 let v: number[] = new number[size]
24 let size: Int = new Int(1) // unboxing dimension conversion
25 let v: number[] = new number[size]
31 let size: long = 1 as long // narrowing dimension conversion
32 let v: Byte[] = new Byte[size]
38 let size: Long = new Long(1 as long) // unboxing and narrowing dimension conversion
39 let v: Byte[] = new Byte[size]
45 let size: number = 1 // narrowing dimension conversion
46 let v: Byte[] = new Byte[size]
[all …]
/arkcompiler/ets_runtime/test/fuzztest/jsvaluerefiscorrect_fuzzer/
Djsvaluerefiscorrect_fuzzer.cpp26 void JSValueRefIsFalseFuzzTest([[maybe_unused]]const uint8_t *data, size_t size) in JSValueRefIsFalseFuzzTest() argument
31 if (size <= 0) { in JSValueRefIsFalseFuzzTest()
40 void JSValueRefIsTrueFuzzTest(const uint8_t *data, size_t size) in JSValueRefIsTrueFuzzTest() argument
45 if (data == nullptr || size <= 0) { in JSValueRefIsTrueFuzzTest()
50 size = size > sizeof(int) ? sizeof(int) : size; in JSValueRefIsTrueFuzzTest()
51 if (memcpy_s(&value, sizeof(int), data, size) != EOK) { in JSValueRefIsTrueFuzzTest()
61 void JSValueRefIsHoleFuzzTest(const uint8_t *data, size_t size) in JSValueRefIsHoleFuzzTest() argument
66 if (data == nullptr || size <= 0) { in JSValueRefIsHoleFuzzTest()
71 size = size > sizeof(int) ? sizeof(int) : size; in JSValueRefIsHoleFuzzTest()
72 if (memcpy_s(&value, sizeof(int), data, size) != EOK) { in JSValueRefIsHoleFuzzTest()
[all …]
/arkcompiler/runtime_core/platforms/unix/libpandabase/
Dmem.cpp25 void MmapDeleter(std::byte *ptr, size_t size) noexcept in MmapDeleter() argument
28 munmap(ptr, size); in MmapDeleter()
32 BytePtr MapFile(file::File file, uint32_t prot, uint32_t flags, size_t size, size_t file_offset, vo… in MapFile() argument
36 size_t map_size = size + offset; in MapFile()
44 return BytePtr(static_cast<std::byte *>(result) + offset, size, offset, MmapDeleter); in MapFile()
47 BytePtr MapExecuted(size_t size) in MapExecuted() argument
49 // By design caller should pass valid size, so don't do any additional checks except ones that in MapExecuted()
52 void *result = mmap(nullptr, size, PROT_EXEC | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); in MapExecuted()
57 return BytePtr(static_cast<std::byte *>(result), (result == nullptr) ? 0 : size, MmapDeleter); in MapExecuted()
60 std::optional<Error> MakeMemWithProtFlag(void *mem, size_t size, int prot) in MakeMemWithProtFlag() argument
[all …]
/arkcompiler/runtime_core/static_core/platforms/unix/libpandabase/
Dmem.cpp34 void MmapDeleter(std::byte *ptr, size_t size) noexcept in MmapDeleter() argument
37 munmap(ptr, size); in MmapDeleter()
42 BytePtr MapFile(file::File file, uint32_t prot, uint32_t flags, size_t size, size_t fileOffset, voi… in MapFile() argument
46 size_t mapSize = size + offset; in MapFile()
55 return BytePtr(static_cast<std::byte *>(result) + offset, size, offset, MmapDeleter); in MapFile()
58 BytePtr MapExecuted(size_t size) in MapExecuted() argument
60 // By design caller should pass valid size, so don't do any additional checks except ones that in MapExecuted()
63 void *result = mmap(nullptr, size, PROT_EXEC | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); in MapExecuted()
68 return BytePtr(static_cast<std::byte *>(result), (result == nullptr) ? 0 : size, MmapDeleter); in MapExecuted()
71 std::optional<Error> MakeMemWithProtFlag(void *mem, size_t size, int prot) in MakeMemWithProtFlag() argument
[all …]
/arkcompiler/ets_runtime/test/fuzztest/jsvaluerefisarray_fuzzer/
Djsvaluerefisarray_fuzzer.cpp24 void IsInt8ArrayFuzztest(const uint8_t *data, size_t size) in IsInt8ArrayFuzztest() argument
29 if (data == nullptr || size <= 0) { in IsInt8ArrayFuzztest()
34 …Local<ArrayBufferRef> arrayBuffer = ArrayBufferRef::New(vm, (void *)data, (int32_t)size, deleter, … in IsInt8ArrayFuzztest()
35 Local<JSValueRef> typedArray = Int8ArrayRef::New(vm, arrayBuffer, 0, (int32_t)size); in IsInt8ArrayFuzztest()
40 void IsUint8ArrayFuzztest(const uint8_t *data, size_t size) in IsUint8ArrayFuzztest() argument
45 if (data == nullptr || size <= 0) { in IsUint8ArrayFuzztest()
50 …Local<ArrayBufferRef> arrayBuffer = ArrayBufferRef::New(vm, (void *)data, (int32_t)size, deleter, … in IsUint8ArrayFuzztest()
51 Local<JSValueRef> typedArray = Uint8ArrayRef::New(vm, arrayBuffer, 0, (int32_t)size); in IsUint8ArrayFuzztest()
56 void IsUint8ClampedArrayFuzztest(const uint8_t *data, size_t size) in IsUint8ClampedArrayFuzztest() argument
61 if (data == nullptr || size <= 0) { in IsUint8ClampedArrayFuzztest()
[all …]
/arkcompiler/ets_runtime/test/fuzztest/bufferrefnew_fuzzer/
Dbufferrefnew_fuzzer.cpp24 void BufferRefNewFuzzTest([[maybe_unused]]const uint8_t *data, size_t size) in BufferRefNewFuzzTest() argument
29 if (size <= 0) { in BufferRefNewFuzzTest()
33 BufferRef::New(vm, (int32_t)size); in BufferRefNewFuzzTest()
37 void BufferRefMultiParamNewFuzzTest(const uint8_t *data, size_t size) in BufferRefMultiParamNewFuzzTest() argument
39 if (data == nullptr || size <= 0) { in BufferRefMultiParamNewFuzzTest()
47 BufferRef::New(vm, (void *)data, (int32_t)size, deleter, (void *)data); in BufferRefMultiParamNewFuzzTest()
51 void BufferRefByteLengthFuzzTest([[maybe_unused]]const uint8_t *data, size_t size) in BufferRefByteLengthFuzzTest() argument
56 if (size <= 0) { in BufferRefByteLengthFuzzTest()
60 Local<BufferRef> buffer = BufferRef::New(vm, (int32_t)size); in BufferRefByteLengthFuzzTest()
65 void BufferRefGetBufferFuzzTest([[maybe_unused]]const uint8_t *data, size_t size) in BufferRefGetBufferFuzzTest() argument
[all …]
/arkcompiler/ets_runtime/ecmascript/platform/unix/
Dmap.cpp24 MemMap PageMap(size_t size, int prot, size_t alignment, void *addr, int flags) in PageMap() argument
26 ASSERT(size == AlignUp(size, PageSize())); in PageMap()
28 size_t allocSize = size + alignment; in PageMap()
38 void *alignEndResult = reinterpret_cast<void *>(alignResult + size); in PageMap()
43 return MemMap(result, size); in PageMap()
51 MemMap MachineCodePageMap(size_t size, int prot, size_t alignment) in MachineCodePageMap() argument
53 MemMap memMap = PageMap(size, prot, alignment); in MachineCodePageMap()
67 void PageRelease(void *mem, size_t size) in PageRelease() argument
69 madvise(mem, size, MADV_DONTNEED); in PageRelease()
72 void PagePreRead(void *mem, size_t size) in PagePreRead() argument
[all …]
/arkcompiler/runtime_core/libpandabase/mem/
Dmmap_mem_pool-inl.h32 inline Pool MmapPoolMap::PopFreePool(size_t size) in PopFreePool() argument
34 auto element = free_pools_.lower_bound(size); in PopFreePool()
45 Pool pool(size, element_mem); in PopFreePool()
47 if (size < element_size) { in PopFreePool()
48 Pool new_pool(element_size - size, ToVoidPtr(ToUintPtr(element_mem) + size)); in PopFreePool()
49 mmap_pool->SetSize(size); in PopFreePool()
134 // We should get aligned to PANDA_POOL_ALIGNMENT_IN_BYTES size in MmapMemPool()
147 … << ToVoidPtr(min_object_memory_addr_) << " Preallocated size is equal to " in MmapMemPool()
180 inline ArenaT *MmapMemPool::AllocArenaImpl(size_t size, SpaceType space_type, AllocatorType allocat… in AllocArenaImpl() argument
184 LOG_MMAP_MEM_POOL(DEBUG) << "Try to get new arena with size " << std::dec << size << " for " in AllocArenaImpl()
[all …]

12345678910>>...116