Home
last modified time | relevance | path

Searched full:malloc (Results 1 – 25 of 90) sorted by relevance

1234

/arkcompiler/ets_runtime/ecmascript/mem/
Dnative_area_allocator.cpp37 // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) in AllocateArea()
38 void *mem = malloc(capacity); in AllocateArea()
40 LOG_ECMA_MEM(FATAL) << "malloc failed, current alloc size = " << capacity in AllocateArea()
74 // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) in FreeArea()
90 // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) in Free()
100 // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) in AllocateBuffer()
101 void *ptr = malloc(size); in AllocateBuffer()
103 LOG_ECMA_MEM(FATAL) << "malloc failed, current alloc size = " << size in AllocateBuffer()
131 // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) in FreeBuffer()
141 // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) in NativeAreaPageMap()
[all …]
Dnative_area_allocator.h183 // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) in Allocate()
184 void *ptr = malloc(size); in Allocate()
186 LOG_ECMA_MEM(FATAL) << "malloc failed"; in Allocate()
200 // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) in AllocateSpace()
201 void *mem = malloc(capacity); in AllocateSpace()
203 LOG_ECMA_MEM(FATAL) << "malloc failed"; in AllocateSpace()
217 // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) in FreeSpace()
Dcaddress_allocator.h108 // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) in Allocate()
109 void *ptr = malloc(size); in Allocate()
111 LOG_ECMA_MEM(FATAL) << "malloc failed, size is: " << size << ", errno: " << errno; in Allocate()
158 // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) in Free()
/arkcompiler/runtime_core/static_core/libpandabase/tests/
Dnative_bytes_from_mallinfo_test.cpp28 // NOLINTBEGIN(readability-magic-numbers,cppcoreguidelines-no-malloc,clang-analyzer-unix.Malloc, in TEST()
33 p1[i] = malloc(64U); in TEST()
43 p2[i] = malloc(4U * 1024U * 1024U); in TEST()
62 // NOLINTEND(readability-magic-numbers,cppcoreguidelines-no-malloc,clang-analyzer-unix.Malloc, in TEST()
Dmem_hooks_test.cpp25 char *ptr = static_cast<char *>(malloc(5_MB)); // NOLINT(cppcoreguidelines-no-malloc) in MallocFunc()
28 std::cout << ptr << std::endl; // NOLINT(clang-analyzer-unix.Malloc) in MallocFunc()
37 // Allocate too much memory via malloc in MallocFunc, so test must die in TEST()
/arkcompiler/ets_runtime/ecmascript/compiler/tests/
Dsatepoint_GC_0.ll16 %tmp1 = call i8 addrspace(0)* @malloc(i64 8)
17 %tmp2 = call i8 addrspace(0)* @malloc(i64 8)
18 %tmp3 = call i8 addrspace(0)* @malloc(i64 8)
19 %tmp4 = call i8 addrspace(0)* @malloc(i64 8)
20 %tmp5 = call i8 addrspace(0)* @malloc(i64 8)
21 %tmp6 = call i8 addrspace(0)* @malloc(i64 8)
22 %tmp7 = call i8 addrspace(0)* @malloc(i64 8)
23 %tmp8 = call i8 addrspace(0)* @malloc(i64 8)
94 declare noalias i8* @malloc(i64)
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/mempool/include/
Dmempool.h72 void *block = malloc(size); in RealAllocMemory()
73 CHECK_FATAL(block != nullptr, "malloc failed"); in RealAllocMemory()
172 virtual void *Malloc(size_t size);
190 void *p = Malloc(sizeof(T)); in Clone()
199 void *p = Malloc(sizeof(T)); in New()
208 void *p = Malloc(sizeof(T) * num); in NewArray()
230 void *Malloc(size_t size) override in Malloc() function
232 return MemPool::Malloc(size); in Malloc()
273 // all malloc requested from LocalMapleAllocator
274 void *Malloc(size_t size) override;
/arkcompiler/runtime_core/static_core/platforms/unix/libpandabase/
Dmem_hooks.cpp52 // libdwarf allocates a lot of memory using malloc internally. in Initialize()
54 // malloc calls from this library. in Initialize()
62 dlsym(RTLD_NEXT, "malloc")); // NOLINT(cppcoreguidelines-pro-type-cstyle-cast) in SaveRealFunctions()
84 // tracking internal allocator is implemented by malloc, we would fail here with this option in MallocHook()
91 void *result = realMalloc_(size); // NOLINT(cppcoreguidelines-no-malloc) in MallocHook()
93 std::cerr << "Malloc error" << std::endl; in MallocHook()
105 // tracking internal allocator is implemented by malloc, we would fail here with this option in MemalignHook()
123 realFree_(ptr); // NOLINT(cppcoreguidelines-no-malloc) in FreeHook()
147 void *malloc(size_t size) noexcept in malloc() function
Dmem_hooks.h85 // Sanitizers hook malloc functions, so we don't use memory hooks
93 void *malloc(size_t size) noexcept; // NOLINT(readability-redundant-declaratio…
Dmem.cpp29 #include <malloc.h>
128 // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) in AlignedFree()
333 // For GLIBC, uordblks is total size of space which is allocated by malloc in GetNativeBytesFromMallinfo()
334 …ile libc, uordblks is total size of space which is allocated by malloc or mmap called by malloc for in GetNativeBytesFromMallinfo()
346 …// For GLIBC, hblkhd is total size of space which is allocated by mmap called by malloc for non-sm… in GetNativeBytesFromMallinfo()
/arkcompiler/ets_runtime/ecmascript/shared_mm/
Dshared_mm.cpp87 // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) in AllocateBuffer()
88 void *ptr = malloc(size); in AllocateBuffer()
90 LOG_ECMA_MEM(FATAL) << "malloc failed"; in AllocateBuffer()
107 // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) in FreeBuffer()
/arkcompiler/ets_runtime/ecmascript/platform/unix/linux/
Dmemory.cpp18 #include <malloc.h>
23 LOG_ECMA(INFO) << "Initialize Malloc Config in linux not support"; in InitializeMallocConfig()
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/mempool/src/
Dmempool.cpp128 uint8_t *block = reinterpret_cast<uint8_t *>(malloc(size)); in AllocBigMemBlock()
129 CHECK_FATAL(block != nullptr, "malloc failed"); in AllocBigMemBlock()
138 void *MemPool::Malloc(size_t size) in Malloc() function in maple::MemPool
160 // Malloc size of memory from memory pool, then set 0
163 void *p = Malloc(BITS_ALIGN(size)); in Calloc()
173 void *result = Malloc(newSize); in Realloc()
204 void *StackMemPool::Malloc(size_t size) in Malloc() function in maple::StackMemPool
/arkcompiler/ets_runtime/tools/ap_file_viewer/native/src/
Dmain.cpp41 char *buffer = (char *)malloc(length); in main()
43 LOG_NO_TAG(ERROR) << "malloc buffer failed"; in main()
47 LOG_NO_TAG(ERROR) << "clean malloc buffer failed"; in main()
/arkcompiler/ets_runtime/ecmascript/platform/unix/mac/
Dos.cpp19 #include <malloc/malloc.h>
94 LOG_ECMA(INFO) << "Initialize Malloc Config in mac not support"; in InitializeMallocConfig()
/arkcompiler/runtime_core/static_core/runtime/tests/
Dstack_like_allocator_test.cpp179 void *invalidAddr = std::malloc(ALLOCATION_SIZE); // NOLINT(cppcoreguidelines-no-malloc) in TEST_F()
182 ASSERT_FALSE(alloc.Contains(invalidAddr)); // NOLINT(clang-analyzer-unix.Malloc) in TEST_F()
186 ASSERT_FALSE(alloc.Contains(invalidAddr)); // NOLINT(clang-analyzer-unix.Malloc) in TEST_F()
198 free(invalidAddr); // NOLINT(cppcoreguidelines-no-malloc) in TEST_F()
Dframe_allocator_test.cpp186 // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) in CheckAddrInsideAllocator()
187 void *invalidAddr = std::malloc(MALLOC_ALLOC_SIZE); in CheckAddrInsideAllocator()
190 // NOLINTNEXTLINE(clang-analyzer-unix.Malloc) in CheckAddrInsideAllocator()
211 // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) in CheckAddrInsideAllocator()
/arkcompiler/runtime_core/static_core/verification/verifier/
Doptions.yaml111 - malloc
114 …Default means using malloc for Release, and panda allocators for Debug builds. If we use malloc, w…
/arkcompiler/ets_runtime/ecmascript/platform/windows/
Dos.cpp18 #include <malloc.h>
79 LOG_ECMA(INFO) << "Initialize Malloc Config in windows not support"; in InitializeMallocConfig()
/arkcompiler/runtime_core/platforms/unix/libpandabase/
Dmem.cpp20 #include <malloc.h>
118 // NOLINTNEXTLINE(cppcoreguidelines-no-malloc) in AlignedFree()
266 // For GLIBC, uordblks is total size of space which is allocated by malloc in GetNativeBytesFromMallinfo()
267 …ile libc, uordblks is total size of space which is allocated by malloc or mmap called by malloc for in GetNativeBytesFromMallinfo()
279 …// For GLIBC, hblkhd is total size of space which is allocated by mmap called by malloc for non-sm… in GetNativeBytesFromMallinfo()
/arkcompiler/runtime_core/libpandabase/tests/
Dnative_bytes_from_mallinfo_test.cpp32 p1[i] = malloc(64); in TEST()
41 p2[i] = malloc(4 * 1024 * 1024); in TEST()
/arkcompiler/runtime_core/libpandabase/mem/
Dmalloc_mem_pool-inl.h79 void *mem = std::malloc(size); // NOLINT(cppcoreguidelines-no-malloc) in AllocPoolImpl()
89 std::free(mem); // NOLINT(cppcoreguidelines-no-malloc) in FreePoolImpl()
/arkcompiler/runtime_core/static_core/libpandabase/mem/
Dmalloc_mem_pool-inl.h85 void *mem = std::malloc(size); // NOLINT(cppcoreguidelines-no-malloc) in AllocPoolImpl()
99 std::free(mem); // NOLINT(cppcoreguidelines-no-malloc) in FreePoolImpl()
/arkcompiler/ets_runtime/ecmascript/serializer/
Dserialize_chunk.h68 void *newChunk = malloc(newCapacity); in Expand()
70 LOG_ECMA_MEM(FATAL) << "malloc failed, current alloc size = " << newCapacity; in Expand()
/arkcompiler/ets_runtime/ecmascript/platform/unix/ohos/
Dmemory.cpp17 #include <malloc.h>

1234