Home
last modified time | relevance | path

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

12345678910>>...184

/external/llvm-project/lldb/test/Shell/Expr/Inputs/
Dir-memory-map-mix-malloc-free1 L1 = malloc 32 2
3 L2 = malloc 3 4
4 L3 = malloc 3 128
7 L4 = malloc 2 16
9 L5 = malloc 4097 4
11 L6 = malloc 2 2
12 L7 = malloc 3 2
13 L8 = malloc 32 16
17 L9 = malloc 8192 2
18 L10 = malloc 33 4
[all …]
Dir-memory-map-basic1 L1 = malloc 0 1
2 L2 = malloc 1 1
4 L3 = malloc 2 1
5 L4 = malloc 2 2
6 L5 = malloc 2 4
8 L6 = malloc 3 1
9 L7 = malloc 3 2
10 L8 = malloc 3 4
12 L9 = malloc 128 1
13 L10 = malloc 128 2
[all …]
Dir-memory-map-overlap11 L1 = malloc 8 16
2 L2 = malloc 16 8
3 L3 = malloc 64 32
4 L4 = malloc 1 8
5 L5 = malloc 64 32
6 L6 = malloc 64 8
7 L7 = malloc 1024 32
8 L8 = malloc 1 16
9 L9 = malloc 8 16
10 L10 = malloc 1024 16
/external/clang/test/Analysis/
Dmalloc.c23 void *malloc(size_t);
45 int *p = malloc(12); in f1()
50 int *p = malloc(12); in f2()
56 int *p = malloc(12); in f2_realloc_0()
62 int *p = malloc(12); in f2_realloc_1()
68 char *p = (char*)malloc(size); in reallocNotNullPtr()
88 int *q = malloc(12); in realloctest1()
95 char *p = malloc(12); in reallocFails()
105 char *p = malloc(12); in reallocSizeZero1()
115 char *p = malloc(12); in reallocSizeZero2()
[all …]
Dmalloc-annotations.c3 void *malloc(size_t);
7 void __attribute((ownership_returns(malloc))) *my_malloc(size_t);
8 void __attribute((ownership_takes(malloc, 1))) my_free(void *);
10 __attribute((ownership_holds(malloc, 1, 2)));
11 void __attribute((ownership_returns(malloc, 1))) *my_malloc2(size_t);
12 void __attribute((ownership_holds(malloc, 1))) my_hold(void *);
17 void __attribute((ownership_holds(malloc, 1)))
18 __attribute((ownership_holds(malloc, 1)))
19 __attribute((ownership_holds(malloc, 3))) my_hold2(void *, void *, void *);
28 int *p = malloc(12); in f1()
[all …]
Dmalloc-plist.c6 void *malloc(size_t);
12 int *p = malloc(12); in diagnosticTest()
20 A = malloc(2*sizeof(int*)); in myArrayAllocation()
25 char * buf = malloc(100); in reallocDiagnostics()
36 void *x = malloc(100); in wrapper()
54 *x = malloc(100); in my_malloc_and_free()
75 char *buf = (char *)malloc(100); in reallocIntra()
82 return (char*)malloc(12); in malloc_wrapper_ret()
99 int *p = malloc(sizeof(int)); in call_myfree_takingblock()
108 p = (int*)malloc(12); in LeakedSymbol()
[all …]
Dmalloc-overflow.c5 extern void * malloc(size_t);
9 …return malloc(n * sizeof(int)); // expected-warning {{the computation of the size of the memory a… in f1()
14 …return malloc(sizeof(int) * n); // // expected-warning {{the computation of the size of the memory… in f2()
19 return malloc(4 * sizeof(int)); // no-warning in f3()
29 …return malloc(s->n * sizeof(int)); // expected-warning {{the computation of the size of the memory… in f4()
35 …return malloc(s2.n * sizeof(int)); // expected-warning {{the computation of the size of the memory… in f5()
40 …return malloc((n + 1) * sizeof(int)); // expected-warning {{the computation of the size of the mem… in f6()
43 extern void * malloc (size_t);
49 return malloc(n * sizeof(int)); // no-warning in f7()
55 return malloc(n * sizeof(int)); // no-warning in f8()
[all …]
Dmalloc-sizeof.c5 void *malloc(size_t size);
14 int *ip1 = malloc(sizeof(1)); in foo()
15 int *ip2 = malloc(4 * sizeof(int)); in foo()
17 …long *lp1 = malloc(sizeof(short)); // expected-warning {{Result of 'malloc' is converted to a poin… in foo()
18 …long *lp2 = malloc(5 * sizeof(double)); // expected-warning {{Result of 'malloc' is converted to a… in foo()
19 char *cp3 = malloc(5 * sizeof(char) + 2); // no warning in foo()
20 unsigned char *buf = malloc(readSize + sizeof(unsignedInt)); // no warning in foo()
33 const char **x = (const char **)malloc(1 * sizeof(char *)); // no-warning in ignore_const()
34 …const char ***y = (const char ***)malloc(1 * sizeof(char *)); // expected-warning {{Result of 'mal… in ignore_const()
41 int *table = malloc(sizeof sTable); in mallocArraySize()
[all …]
Dmalloc.mm3 #import "Inputs/system-header-simulator-for-malloc.h"
7 unsigned char *data = (unsigned char *)malloc(42);
12 unsigned char *data = (unsigned char *)malloc(42);
17 unsigned char *data = (unsigned char *)malloc(42);
22 unsigned char *data = (unsigned char *)malloc(42);
27 unsigned char *data = (unsigned char *)malloc(42);
32 unichar *data = (unichar*)malloc(42);
38 unsigned char *data = (unsigned char *)malloc(42);
43 unichar *data = (unichar*)malloc(42);
49 unsigned char *data = (unsigned char *)malloc(42);
[all …]
DMalloc+MismatchedDeallocator+NewDelete.cpp10 int *p = (int *)malloc(sizeof(int)); in testMallocDoubleFree()
16 int *p = (int *)malloc(sizeof(int)); in testMallocLeak()
20 int *p = (int *)malloc(sizeof(int)); in testMallocUseAfterFree()
31 int *p = (int *)malloc(sizeof(int)); in testMallocOffsetFree()
39 int *x = (int *)malloc(sizeof(int)); in testMismatchedDeallocator()
83 int *p = (int*)malloc(sizeof(int)*4); in testMismatchedChangePtrThroughCall()
89 int *p = (int*)malloc(sizeof(int)*4); in testMismatchedChangePointeeThroughCall()
95 int *p = (int*)malloc(sizeof(int)*4); in testShouldReportDoubleFreeNotMismatched()
/external/llvm-project/clang/test/Analysis/
Dmalloc.c28 void *malloc(size_t);
50 int *p = malloc(12); in f1()
55 int *p = malloc(12); in f2()
61 int *p = malloc(12); in f2_realloc_0()
67 int *p = malloc(12); in f2_realloc_1()
73 char *p = (char*)malloc(size); in reallocNotNullPtr()
93 int *q = malloc(12); in realloctest1()
100 char *p = malloc(12); in reallocFails()
110 char *p = malloc(12); in reallocSizeZero1()
120 char *p = malloc(12); in reallocSizeZero2()
[all …]
Dmalloc-annotations.c9 void *malloc(size_t);
13 void __attribute((ownership_returns(malloc))) *my_malloc(size_t);
14 void __attribute((ownership_takes(malloc, 1))) my_free(void *);
16 __attribute((ownership_holds(malloc, 1, 2)));
17 void __attribute((ownership_returns(malloc, 1))) *my_malloc2(size_t);
18 void __attribute((ownership_holds(malloc, 1))) my_hold(void *);
23 void __attribute((ownership_holds(malloc, 1)))
24 __attribute((ownership_holds(malloc, 1)))
25 __attribute((ownership_holds(malloc, 3))) my_hold2(void *, void *, void *);
34 int *p = malloc(12); in f1()
[all …]
Dmalloc-plist.c6 void *malloc(size_t);
12 int *p = malloc(12); in diagnosticTest()
21 A = malloc(2*sizeof(int*)); in myArrayAllocation()
26 char * buf = malloc(100); in reallocDiagnostics()
37 void *x = malloc(100); in wrapper()
55 *x = malloc(100); in my_malloc_and_free()
76 char *buf = (char *)malloc(100); in reallocIntra()
83 return (char*)malloc(12); in malloc_wrapper_ret()
100 int *p = malloc(sizeof(int)); in call_myfree_takingblock()
109 p = (int*)malloc(12); in LeakedSymbol()
[all …]
Dmalloc-overflow.c5 extern void * malloc(size_t);
9 …return malloc(n * sizeof(int)); // expected-warning {{the computation of the size of the memory a… in f1()
14 …return malloc(sizeof(int) * n); // // expected-warning {{the computation of the size of the memory… in f2()
19 return malloc(4 * sizeof(int)); // no-warning in f3()
29 …return malloc(s->n * sizeof(int)); // expected-warning {{the computation of the size of the memory… in f4()
35 …return malloc(s2.n * sizeof(int)); // expected-warning {{the computation of the size of the memory… in f5()
40 …return malloc((n + 1) * sizeof(int)); // expected-warning {{the computation of the size of the mem… in f6()
43 extern void * malloc (size_t);
49 return malloc(n * sizeof(int)); // no-warning in f7()
55 return malloc(n * sizeof(int)); // no-warning in f8()
[all …]
Dmalloc-sizeof.c5 void *malloc(size_t size);
14 int *ip1 = malloc(sizeof(1)); in foo()
15 int *ip2 = malloc(4 * sizeof(int)); in foo()
17 …long *lp1 = malloc(sizeof(short)); // expected-warning {{Result of 'malloc' is converted to a poin… in foo()
18 …long *lp2 = malloc(5 * sizeof(double)); // expected-warning {{Result of 'malloc' is converted to a… in foo()
19 char *cp3 = malloc(5 * sizeof(char) + 2); // no warning in foo()
20 unsigned char *buf = malloc(readSize + sizeof(unsignedInt)); // no warning in foo()
33 const char **x = (const char **)malloc(1 * sizeof(char *)); // no-warning in ignore_const()
34 …const char ***y = (const char ***)malloc(1 * sizeof(char *)); // expected-warning {{Result of 'mal… in ignore_const()
41 int *table = malloc(sizeof sTable); in mallocArraySize()
[all …]
Dmalloc.mm7 #import "Inputs/system-header-simulator-for-malloc.h"
11 unsigned char *data = (unsigned char *)malloc(42);
16 unsigned char *data = (unsigned char *)malloc(42);
21 unsigned char *data = (unsigned char *)malloc(42);
26 unsigned char *data = (unsigned char *)malloc(42);
31 unsigned char *data = (unsigned char *)malloc(42);
36 unichar *data = (unichar*)malloc(42);
42 unsigned char *data = (unsigned char *)malloc(42);
47 unichar *data = (unichar*)malloc(42);
53 unsigned char *data = (unsigned char *)malloc(42);
[all …]
DMalloc+MismatchedDeallocator+NewDelete.cpp10 int *p = (int *)malloc(sizeof(int)); in testMallocDoubleFree()
16 int *p = (int *)malloc(sizeof(int)); in testMallocLeak()
20 int *p = (int *)malloc(sizeof(int)); in testMallocUseAfterFree()
31 int *p = (int *)malloc(sizeof(int)); in testMallocOffsetFree()
39 int *x = (int *)malloc(sizeof(int)); in testMismatchedDeallocator()
83 int *p = (int*)malloc(sizeof(int)*4); in testMismatchedChangePtrThroughCall()
89 int *p = (int*)malloc(sizeof(int)*4); in testMismatchedChangePointeeThroughCall()
95 int *p = (int*)malloc(sizeof(int)*4); in testShouldReportDoubleFreeNotMismatched()
/external/llvm-project/clang-tools-extra/test/clang-tidy/checkers/
Dcppcoreguidelines-owning-memory-legacy-functions.cpp16 void *malloc(size_t ByteCount);
40 using ::malloc;
58 int *arrayFactory1() { return (int *)std::malloc(100); } in arrayFactory1()
60 gsl::owner<int *> arrayFactory2() { return (int *)std::malloc(100); } // Ok in arrayFactory2()
61 void *dataFactory1() { return std::malloc(100); } in dataFactory1()
63 gsl::owner<void *> dataFactory2() { return std::malloc(100); } // Ok in dataFactory2()
69 int *IntArray1 = (int *)std::malloc(ByteCount); in test_resource_creators()
71 int *IntArray2 = static_cast<int *>(std::malloc(ByteCount)); // Bad in test_resource_creators()
73 void *IntArray3 = std::malloc(ByteCount); in test_resource_creators()
76 int *IntArray4 = (int *)::malloc(ByteCount); in test_resource_creators()
[all …]
Dbugprone-misplaced-operator-in-strlen-in-alloc.c4 void *malloc(size_t);
20 char *new_name = (char *)malloc(strlen(name + 1)); in bad_malloc()
23 new_name = (char *)malloc(strnlen(name + 1, 10)); in bad_malloc()
26 new_name = (char *)malloc(strnlen_s(name + 1, 10)); in bad_malloc()
32 wchar_t *new_name = (wchar_t *)malloc(wcslen(name + 1)); in bad_malloc_wide()
35 new_name = (wchar_t *)malloc(wcsnlen(name + 1, 10)); in bad_malloc_wide()
38 new_name = (wchar_t *)malloc(wcsnlen_s(name + 1, 10)); in bad_malloc_wide()
62 char *new_name = (char *)malloc(strlen(name + 1) + 1); in intentional1()
68 char *new_name = (char *)malloc(strlen(name + 2)); in intentional2()
74 char *new_name = (char *)malloc(strlen((name + 1))); in intentional3()
[all …]
Dbugprone-misplaced-pointer-arithmetic-in-alloc.c4 void *malloc(size_t);
10 char *p = (char *)malloc(n) + 10; in bad_malloc()
14 p = (char *)malloc(n) - 10; in bad_malloc()
18 p = (char *)malloc(n) + n; in bad_malloc()
22 p = (char *)malloc(n) - (n + 10); in bad_malloc()
26 p = (char *)malloc(n) - n + 10; in bad_malloc()
50 void (*(*const alloc_ptr)(size_t)) = malloc;
/external/webrtc/common_audio/resampler/
Dresampler.cc153 state1_ = malloc(8 * sizeof(int32_t)); in Reset()
157 state1_ = malloc(sizeof(WebRtcSpl_State16khzTo48khz)); in Reset()
163 state1_ = malloc(8 * sizeof(int32_t)); in Reset()
166 state2_ = malloc(8 * sizeof(int32_t)); in Reset()
171 state1_ = malloc(8 * sizeof(int32_t)); in Reset()
174 state2_ = malloc(sizeof(WebRtcSpl_State16khzTo48khz)); in Reset()
180 state1_ = malloc(8 * sizeof(int32_t)); in Reset()
183 state2_ = malloc(8 * sizeof(int32_t)); in Reset()
186 state3_ = malloc(sizeof(WebRtcSpl_State16khzTo48khz)); in Reset()
192 state1_ = malloc(sizeof(WebRtcSpl_State16khzTo48khz)); in Reset()
[all …]
/external/clang/test/Sema/
Dattr-malloc.c7 void * malloc(size_t) __attribute((malloc));
9 int no_vars __attribute((malloc)); // expected-warning {{attribute only applies to functions}}
11 void returns_void (void) __attribute((malloc)); // expected-warning {{attribute only applies to r…
12 int returns_int (void) __attribute((malloc)); // expected-warning {{attribute only applies to r…
13 int * returns_intptr(void) __attribute((malloc)); // no-warning
15 iptr returns_iptr (void) __attribute((malloc)); // no-warning
17 __attribute((malloc)) void *(*f)(); // expected-warning{{attribute only applies to functions}}
18 __attribute((malloc)) int (*g)(); // expected-warning{{attribute only applies to functions}}
20 __attribute((malloc))
21 void * xalloc(unsigned n) { return malloc(n); } // no-warning in xalloc()
[all …]
/external/llvm-project/clang/test/Sema/
Dattr-malloc.c7 void * malloc(size_t) __attribute((malloc));
9 int no_vars __attribute((malloc)); // expected-warning {{attribute only applies to functions}}
11 void returns_void (void) __attribute((malloc)); // expected-warning {{attribute only applies to r…
12 int returns_int (void) __attribute((malloc)); // expected-warning {{attribute only applies to r…
13 int * returns_intptr(void) __attribute((malloc)); // no-warning
15 iptr returns_iptr (void) __attribute((malloc)); // no-warning
17 __attribute((malloc)) void *(*f)(); // expected-warning{{attribute only applies to functions}}
18 __attribute((malloc)) int (*g)(); // expected-warning{{attribute only applies to functions}}
20 __attribute((malloc))
21 void * xalloc(unsigned n) { return malloc(n); } // no-warning in xalloc()
[all …]
/external/google-fruit/tests/
Dvalgrind_suppressions.supp2 malloc/__emutls_get_address
5 fun:malloc
9 malloc/__dtoa
12 fun:malloc
17 malloc/tlv_get_addr
20 fun:malloc
25 malloc/__cxa_get_globals
28 fun:malloc
32 malloc/ImageLoader
35 fun:malloc
[all …]
/external/fft2d/src/fft2d/fft2d/
Dalloc.c17 i = (int *) malloc(sizeof(int) * n1); in alloc_1d_int()
33 d = (double *) malloc(sizeof(double) * n1); in alloc_1d_double()
50 ii = (int **) malloc(sizeof(int *) * n1); in alloc_2d_int()
52 i = (int *) malloc(sizeof(int) * n1 * n2); in alloc_2d_int()
74 dd = (double **) malloc(sizeof(double *) * n1); in alloc_2d_double()
76 d = (double *) malloc(sizeof(double) * n1 * n2); in alloc_2d_double()
98 iii = (int ***) malloc(sizeof(int **) * n1); in alloc_3d_int()
100 ii = (int **) malloc(sizeof(int *) * n1 * n2); in alloc_3d_int()
106 i = (int *) malloc(sizeof(int) * n1 * n2 * n3); in alloc_3d_int()
129 ddd = (double ***) malloc(sizeof(double **) * n1); in alloc_3d_double()
[all …]

12345678910>>...184