Home
last modified time | relevance | path

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

123456

/bionic/tests/
Dmalloc_test.cpp60 TEST(malloc, malloc_std) { in TEST() argument
62 void *ptr = malloc(100); in TEST()
68 TEST(malloc, malloc_overflow) { in TEST() argument
71 ASSERT_EQ(nullptr, malloc(SIZE_MAX)); in TEST()
75 TEST(malloc, calloc_std) { in TEST() argument
87 TEST(malloc, calloc_illegal) { in TEST() argument
94 TEST(malloc, calloc_overflow) { in TEST() argument
110 TEST(malloc, memalign_multiple) { in TEST() argument
125 TEST(malloc, memalign_overflow) { in TEST() argument
130 TEST(malloc, memalign_non_power2) { in TEST() argument
[all …]
Dheap_tagging_level_test.cpp54 void *x = malloc(1); in TEST()
63 EXPECT_DEATH(free(untag_address(malloc(1))), "Pointer tag for 0x[a-zA-Z0-9]* was truncated"); in TEST()
65 x = malloc(1); in TEST()
66 void *y = malloc(1); in TEST()
Dmalloc_iterate_test.cpp54 void* ptr = malloc(size); in AllocPtr()
132 void* ptr = malloc(size); in AllocateSizes()
244 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 …]
Dmalloc_hooks.cpp82 return g_dispatch->malloc(bytes); in default_malloc_hook()
132 return g_dispatch->malloc(size); in hooks_malloc()
/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.
304 pointer = malloc(size)
306 **THREAD\_ID**: malloc pointer size
310 186: malloc 0xb6038060 20
380 free/malloc\_usable\_size/realloc calls are passed valid pointers.
393 malloc\_usable\_size, realloc.
[all …]
DREADME_api.md19 by the malloc debug library itself.
47 The calls from within the malloc debug library are automatically removed.
/bionic/libc/bionic/
Dnew.cpp27 void* p = malloc(size); in operator new()
35 void* p = malloc(size); in operator new[]()
51 return malloc(size); in operator new()
55 return malloc(size); in operator new[]()
Dmalloc_common.cpp110 extern "C" void* malloc(size_t bytes) { in malloc() function
114 result = dispatch_table->malloc(bytes); in malloc()
116 result = Malloc(malloc)(bytes); in malloc()
339 Malloc(malloc),
Dmalloc_heapprofd.cpp279 gEphemeralDispatch.malloc = MallocInitHeapprofdHook; in HandleHeapprofdSignal()
415 return previous_dispatch->malloc(bytes); in MallocInitHeapprofdHook()
417 return NativeAllocatorDispatch()->malloc(bytes); in MallocInitHeapprofdHook()
Dsched_cpualloc.c37 return (cpu_set_t*) malloc(CPU_ALLOC_SIZE(count)); // NOLINT in __sched_cpualloc()
Dinitgroups.c43 groups = malloc(numgroups*sizeof(groups[0])); in initgroups()
Dgetcwd.cpp52 buf = allocated_buf = static_cast<char*>(malloc(allocated_size)); in getcwd()
/bionic/libc/upstream-openbsd/lib/libc/stdio/
Dsetvbuf.c93 if ((buf = malloc(size)) == NULL) { in setvbuf()
101 buf = malloc(size); in setvbuf()
/bionic/libc/malloc_hooks/tests/
Dmalloc_hooks_tests.cpp191 void* ptr = malloc(1024); in TEST_F()
229 void* ptr = malloc(1024); in TEST_F()
247 void* ptr = malloc(1024); in TEST_F()
265 void* ptr = malloc(1024); in TEST_F()
/bionic/libc/malloc_debug/tests/
Dmalloc_debug_system_tests.cpp274 void* ptr = malloc(1123); in Malloc()
460 void* ptr = malloc(100); in TEST()
506 void* ptr = malloc(1000); in TEST()
544 void* ptr = malloc(200); in TEST()
/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/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/benchmarks/
Dmalloc_benchmark.cpp50 void* ptr = malloc(size); in BM_mallopt_purge()
/bionic/libc/stdio/
Dvfscanf.cpp337 allocation = wcp = reinterpret_cast<wchar_t*>(malloc(width * sizeof(wchar_t))); in __svfscanf()
400 allocation = p = reinterpret_cast<char*>(malloc(width)); in __svfscanf()
426 allocation = wcp = reinterpret_cast<wchar_t*>(malloc(sizeof(wchar_t) * capacity)); in __svfscanf()
500 allocation = p = reinterpret_cast<char*>(malloc(capacity)); in __svfscanf()
/bionic/libc/private/
Dbionic_malloc_dispatch.h62 MallocMalloc malloc; member

123456