Home
last modified time | relevance | path

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

12345

/bionic/tests/
Dmalloc_test.cpp64 TEST(malloc, malloc_std) { in TEST() argument
66 void *ptr = malloc(100); in TEST()
72 TEST(malloc, malloc_overflow) { in TEST() argument
75 ASSERT_EQ(nullptr, malloc(SIZE_MAX)); in TEST()
79 TEST(malloc, calloc_std) { in TEST() argument
91 TEST(malloc, calloc_mem_init_disabled) { in TEST() argument
109 TEST(malloc, calloc_illegal) { in TEST() argument
116 TEST(malloc, calloc_overflow) { in TEST() argument
132 TEST(malloc, memalign_multiple) { in TEST() argument
147 TEST(malloc, memalign_overflow) { in TEST() argument
[all …]
Dheap_tagging_level_test.cpp56 void *x = malloc(1); in TEST()
65 EXPECT_DEATH(free(untag_address(malloc(1))), "Pointer tag for 0x[a-zA-Z0-9]* was truncated"); in TEST()
67 x = malloc(1); in TEST()
68 void *y = malloc(1); in TEST()
Dmalloc_iterate_test.cpp54 void* ptr = malloc(size); in AllocPtr()
133 void* ptr = malloc(size); in AllocateSizes()
246 void* ptr = malloc(1024); in TEST()
/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[]()
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()
Dmalloc_common.cpp121 extern "C" void* malloc(size_t bytes) { in malloc() function
125 result = dispatch_table->malloc(bytes); in malloc()
127 result = Malloc(malloc)(bytes); in malloc()
347 Malloc(malloc),
Dmalloc_heapprofd.cpp279 gEphemeralDispatch.malloc = MallocInitHeapprofdHook; in HandleHeapprofdSignal()
411 return previous_dispatch->malloc(bytes); in MallocInitHeapprofdHook()
413 return NativeAllocatorDispatch()->malloc(bytes); in MallocInitHeapprofdHook()
/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/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 …]
/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-openbsd/lib/libc/stdio/
Dsetvbuf.c93 if ((buf = malloc(size)) == NULL) { in setvbuf()
101 buf = malloc(size); in setvbuf()
Dvswscanf.c68 if ((mbstr = malloc(len + 1)) == NULL) in vswscanf()
Dvasprintf.c39 f._bf._base = f._p = malloc(INITIAL_SIZE); in vasprintf()
/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/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/private/
Dbionic_malloc_dispatch.h62 MallocMalloc malloc; member
/bionic/linker/
Dlinker_memory.cpp71 void* malloc(size_t byte_count) { in malloc() function
/bionic/libc/upstream-openbsd/lib/libc/stdlib/
Drecallocarray.c66 newptr = malloc(newsize); in recallocarray()

12345