Home
last modified time | relevance | path

Searched refs:malloc (Results 1 – 25 of 136) sorted by relevance

123456

/bionic/tests/
Dmalloc_test.cpp74 TEST(malloc, malloc_std) { in TEST() argument
76 void *ptr = malloc(100); in TEST()
82 TEST(malloc, malloc_overflow) { in TEST() argument
85 ASSERT_EQ(nullptr, malloc(SIZE_MAX)); in TEST()
89 TEST(malloc, calloc_std) { in TEST() argument
101 TEST(malloc, calloc_mem_init_disabled) { in TEST() argument
119 TEST(malloc, calloc_illegal) { in TEST() argument
126 TEST(malloc, calloc_overflow) { in TEST() argument
142 TEST(malloc, memalign_multiple) { in TEST() argument
157 TEST(malloc, memalign_overflow) { in TEST() argument
[all …]
Dhwasan_test.cpp42 void* m = malloc(1); in TEST_F()
54 void* m = malloc(1); in TEST_F()
Dheap_tagging_level_test.cpp65 void *x = malloc(1); in TEST_F()
74 EXPECT_DEATH(free(untag_address(malloc(1))), "Pointer tag for 0x[a-zA-Z0-9]* was truncated"); in TEST_F()
76 x = malloc(1); in TEST_F()
77 void *y = malloc(1); in TEST_F()
Dmalloc_iterate_test.cpp55 void* ptr = malloc(size); in AllocPtr()
134 void* ptr = malloc(size); in AllocateSizes()
247 void* ptr = malloc(1024); in TEST()
/bionic/libc/malloc_hooks/
DREADME.md11 When malloc hooks is enabled, it works by adding a shim layer that replaces
14 * `malloc`
28 These four hooks are defined in malloc.h:
35 When malloc is called and \_\_malloc\_hook has been set, then the hook
59 There is no hook for malloc\_usable\_size as of now.
67 When malloc hooks is enabled, then the hook pointers are set to
71 it runs the risk of crashing whenever a malloc\_usable\_size call is made.
75 Below is a simple implementation intercepting only malloc/calloc calls.
95 Enable malloc hooks using an environment variable:
101 Any process spawned from this shell will run with malloc hooks enabled.
[all …]
/bionic/libc/bionic/
Dnew.cpp28 void* p = malloc(size); in operator new()
35 void* p = malloc(size); in operator new[]()
44 return malloc(size); in operator new()
47 return malloc(size); in operator new[]()
Dmalloc_common.cpp136 extern "C" void* malloc(size_t bytes) { in malloc() function
140 result = dispatch_table->malloc(bytes); in malloc()
142 result = Malloc(malloc)(bytes); in malloc()
377 Malloc(malloc),
Dsched_cpualloc.cpp33 return static_cast<cpu_set_t*>(malloc(CPU_ALLOC_SIZE(count))); in __sched_cpualloc()
Dmalloc_heapprofd.cpp306 gEphemeralDispatch.malloc = MallocInitHeapprofdHook; in HandleHeapprofdSignal()
433 return previous_dispatch->malloc(bytes); in MallocInitHeapprofdHook()
435 return NativeAllocatorDispatch()->malloc(bytes); in MallocInitHeapprofdHook()
Dgetcwd.cpp52 buf = allocated_buf = static_cast<char*>(malloc(allocated_size)); in getcwd()
/bionic/libc/malloc_debug/
DREADME_marshmallow_and_earlier.md8 23 or older. Note: malloc debug was full of bugs and was not fully
12 The documentation for malloc debug on newer versions of Android is
19 When malloc debug is enabled, it works by adding a shim layer that replaces
22 * `malloc`
40 named libc.debug.malloc. It has only a few distinct modes that enables a
41 set of different malloc debug checks at once.
111 Using the special system property, libc.debug.malloc.program, will
112 cause malloc debug to only be used on processes with that name. For example,
113 if the property is set to ls, then only the program named ls will have malloc
118 Enable malloc debug for all allocations for all processes:
[all …]
DREADME.md10 The documentation for malloc debug on older versions of Android is
13 When malloc debug is enabled, it works by adding a shim layer that replaces
16 * `malloc`
105 Note that any backtrace frames that occur within the malloc backtrace library
125 malloc/free occurs.
226 on the next allocation that happens in the process (malloc/free, etc).
386 pointer = malloc(size)
388 **THREAD\_ID**: malloc pointer size
392 186: malloc 0xb6038060 20
462 free/malloc\_usable\_size/realloc calls are passed valid pointers.
[all …]
/bionic/libc/upstream-freebsd/lib/libc/locale/
Dwcsftime.c82 if ((sformat = malloc(sflen + 1)) == NULL) in wcsftime_l()
98 if ((dst = malloc(maxsize * MB_CUR_MAX)) == NULL) in wcsftime_l()
/bionic/libc/upstream-openbsd/lib/libc/stdio/
Dsetvbuf.c94 if ((buf = malloc(size)) == NULL) { in setvbuf()
102 buf = malloc(size); in setvbuf()
/bionic/libc/malloc_debug/tests/
Dmalloc_debug_system_tests.cpp122 jmp_buf* jb = reinterpret_cast<jmp_buf*>(malloc(sizeof(jmp_buf))); in LogReader()
455 void* ptr = malloc(128); in TEST()
505 void* ptr = malloc(1123); in Malloc()
634 void* ptr = malloc(100); in TEST()
675 void* ptr = malloc(8); in TEST()
725 void* ptr = malloc(1000); in TEST()
760 void* ptr = malloc(200); in TEST()
/bionic/libc/malloc_hooks/tests/
Dmalloc_hooks_tests.cpp193 void* ptr = malloc(1024); in TEST_F()
231 void* ptr = malloc(1024); in TEST_F()
249 void* ptr = malloc(1024); in TEST_F()
267 void* ptr = malloc(1024); in TEST_F()
/bionic/libc/upstream-openbsd/lib/libc/string/
Dstrdup.c45 if ((copy = malloc(siz)) == NULL) in strdup()
Dstrndup.c32 copy = malloc(len + 1); in strndup()
/bionic/libc/upstream-freebsd/lib/libc/string/
Dwcsdup.c42 if ((copy = malloc(len * sizeof(wchar_t))) == NULL) in wcsdup()
/bionic/benchmarks/
Dmalloc_benchmark.cpp57 void* ptr = malloc(size); in RunMalloptPurge()
120 void* ptr = malloc(size); in RunThreadsThroughput()
Dmalloc_rss_benchmark.cpp72 MemPool[id][i] = malloc(allocSize); in ThreadTask()
95 MemPool[id][i] = malloc(allocSize); in ThreadTask()
/bionic/libc/upstream-freebsd/lib/libc/stdlib/
Dhcreate_r.c45 hsearch = malloc(sizeof(*hsearch)); in hcreate_r()
Dquick_exit.c60 h = malloc(sizeof(*h)); in at_quick_exit()
/bionic/libc/private/
Dbionic_malloc_dispatch.h62 MallocMalloc malloc; member
/bionic/libc/upstream-openbsd/lib/libc/stdlib/
Drecallocarray.c66 newptr = malloc(newsize); in recallocarray()

123456