Home
last modified time | relevance | path

Searched refs:malloc (Results 1 - 25 of 4089) sorted by relevance

12345678910>>...164

/third_party/unity/extras/memory/test/
H A Dunity_memory_Test.c59 m = malloc(10); in test_ForceMallocFail()
61 mfails = malloc(10); in test_ForceMallocFail()
68 void* m1 = malloc(10); in test_ReallocSmallerIsUnchanged()
77 void* m1 = malloc(10); in test_ReallocSameIsUnchanged()
87 void* m1 = malloc(10); in test_ReallocLargerNeeded()
104 void* m1 = malloc(10); in test_ReallocSizeZeroFreesMemAndReturnsNullPointer()
166 void* m = malloc(10); in test_DetectsLeak()
184 void* m = malloc(10); in test_BufferOverrunFoundDuringFree()
203 void* m = malloc(10); in test_BufferOverrunFoundDuringRealloc()
222 void* m = malloc(1 in test_BufferGuardWriteFoundDuringFree()
[all...]
/base/account/os_account/services/accountmgr/test/unittest/domain_account/mock/
H A Dmock_musl.cpp65 PluginBussnessError* error = (PluginBussnessError *)malloc(sizeof(PluginBussnessError)); in AddServerConfig()
76 PluginBussnessError* error = (PluginBussnessError *)malloc(sizeof(PluginBussnessError)); in RemoveServerConfig()
88 PluginBussnessError* error = (PluginBussnessError *)malloc(sizeof(PluginBussnessError)); in GetAccountServerConfig()
100 PluginBussnessError* error = (PluginBussnessError *)malloc(sizeof(PluginBussnessError)); in Auth()
112 PluginBussnessError* error = (PluginBussnessError *)malloc(sizeof(PluginBussnessError)); in AuthWithPopup()
124 PluginBussnessError* error = (PluginBussnessError *)malloc(sizeof(PluginBussnessError)); in AuthWithToken()
136 PluginBussnessError* error = (PluginBussnessError *)malloc(sizeof(PluginBussnessError)); in GetAccountInfo()
148 PluginBussnessError* error = (PluginBussnessError *)malloc(sizeof(PluginBussnessError)); in GetAuthStatusInfo()
160 PluginBussnessError* error = (PluginBussnessError *)malloc(sizeof(PluginBussnessError)); in BindAccount()
171 PluginBussnessError* error = (PluginBussnessError *)malloc(sizeo in UnbindAccount()
[all...]
/foundation/graphic/graphic_2d/frameworks/opengl_wrapper/test/unittest/
H A Degl_blob_test.cpp57 void *a = malloc(4); in HWTEST_F()
58 void *b = malloc(4); in HWTEST_F()
69 void *value2 = malloc(4); in HWTEST_F()
86 void *a = malloc(4); in HWTEST_F()
87 void *b = malloc(4); in HWTEST_F()
99 void *value2 = malloc(4); in HWTEST_F()
116 void *a = malloc(4); in HWTEST_F()
117 void *b = malloc(4); in HWTEST_F()
128 void *value2 = malloc(4); in HWTEST_F()
145 void *a = malloc( in HWTEST_F()
[all...]
H A Degl_blobfile_test.cpp58 void *a = malloc(4); in HWTEST_F()
59 void *b = malloc(4); in HWTEST_F()
70 void *value2 = malloc(4); in HWTEST_F()
94 void *a = malloc(4); in HWTEST_F()
95 void *b = malloc(4); in HWTEST_F()
106 void *value2 = malloc(4); in HWTEST_F()
/third_party/lz4/ossfuzz/
H A Dround_trip_fuzzer.c25 char* const dstPlusLargePrefix = (char*)malloc(dstCapacity + largeSize); in LLVMFuzzerTestOneInput()
28 char* const largeDict = (char*)malloc(largeSize); in LLVMFuzzerTestOneInput()
32 char* const rt = (char*)malloc(size); in LLVMFuzzerTestOneInput()
46 char* const partial = (char*)malloc(partialCapacity); in LLVMFuzzerTestOneInput()
57 char* const partial = (char*)malloc(partialCapacity); in LLVMFuzzerTestOneInput()
68 char* const partial = (char*)malloc(partialCapacity); in LLVMFuzzerTestOneInput()
79 char* const partial = (char*)malloc(partialCapacity); in LLVMFuzzerTestOneInput()
90 char* const partial = (char*)malloc(partialCapacity); in LLVMFuzzerTestOneInput()
101 char* const partial = (char*)malloc(partialCapacity); in LLVMFuzzerTestOneInput()
/third_party/musl/libc-test/src/regression/
H A Dmalloc-random.c33 void *p = malloc(MALLOC_SIZE_S); in main()
34 void *q = malloc(MALLOC_SIZE_S); in main()
35 void *r = malloc(MALLOC_SIZE_S); in main()
37 t_error("malloc returned NULL\n"); in main()
47 p = malloc(MALLOC_SIZE_L); in main()
48 q = malloc(MALLOC_SIZE_L); in main()
49 r = malloc(MALLOC_SIZE_L); in main()
51 t_error("malloc returned NULL\n"); in main()
63 t_error("malloc(0) random error\n"); in main()
H A Dmalloc-0.c2 // malloc(0) should return unique pointers
3 // (often expected and gnulib replaces malloc if malloc(0) returns 0)
9 void *p = malloc(0); in main()
10 void *q = malloc(0); in main()
11 void *r = malloc(0); in main()
13 t_error("malloc(0) returned NULL\n"); in main()
15 t_error("malloc(0) returned non-unique pointers: %p, %p, %p\n", p, q, r); in main()
/base/account/os_account/frameworks/domain_account/test/moduletest/src/
H A Dmock_domain_so_plugin.cpp53 pVector.data = (uint8_t *)malloc(vector.size()); in SetPluginUint8Vector()
64 PluginBussnessError *error = (PluginBussnessError *)malloc(sizeof(PluginBussnessError)); in Auth()
77 *authResultInfo = (PluginAuthResultInfo *)malloc(sizeof(PluginAuthResultInfo)); in Auth()
87 PluginBussnessError *error = (PluginBussnessError *)malloc(sizeof(PluginBussnessError)); in BindAccount()
100 PluginBussnessError *error = (PluginBussnessError *)malloc(sizeof(PluginBussnessError)); in GetAccountInfo()
111 *domainAccountInfo = (PluginDomainAccountInfo *)malloc(sizeof(PluginDomainAccountInfo)); in GetAccountInfo()
141 PluginBussnessError *error = (PluginBussnessError *)malloc(sizeof(PluginBussnessError)); in IsAuthenticationExpired()
173 PluginBussnessError *error = (PluginBussnessError *)malloc(sizeof(PluginBussnessError)); in SetAccountPolicy()
186 PluginBussnessError* error = (PluginBussnessError *)malloc(sizeof(PluginBussnessError)); in UpdateAccountInfo()
/third_party/cJSON/tests/unity/extras/fixture/test/
H A Dunity_fixture_Test.c52 m = malloc(10); in TEST()
54 mfails = malloc(10); in TEST()
61 void* m1 = malloc(10); in TEST()
69 void* m1 = malloc(10); in TEST()
77 void* m1 = malloc(10); in TEST()
96 void* m1 = malloc(10); in TEST()
372 void* m = malloc(10); in TEST()
390 void* m = malloc(10); in TEST()
409 void* m = malloc(10); in TEST()
428 void* m = malloc(1 in TEST()
[all...]
/third_party/cJSON/tests/
H A Dminify_tests.c48 char* minified = (char*) malloc(sizeof(to_minify)); in cjson_minify_should_remove_single_line_comments()
62 char* minified = (char*) malloc(sizeof(to_minify)); in cjson_minify_should_remove_spaces()
76 char* minified = (char*) malloc(sizeof(to_minify)); in cjson_minify_should_remove_multiline_comments()
90 char* minified = (char*) malloc(sizeof(to_minify)); in cjson_minify_should_not_modify_strings()
146 char *buffer = (char*) malloc(sizeof(to_minify)); in cjson_minify_should_minify_json()
/third_party/backends/testsuite/sanei/
H A Dsanei_config_test.c179 (SANE_Option_Descriptor *) malloc (sizeof (SANE_Option_Descriptor)); in string_option()
192 (SANE_Option_Descriptor *) malloc (sizeof (SANE_Option_Descriptor)); in string_option()
235 (SANE_Option_Descriptor *) malloc (sizeof (SANE_Option_Descriptor)); in int_option()
278 (SANE_Option_Descriptor *) malloc (sizeof (SANE_Option_Descriptor)); in wrong_range_int_option()
321 (SANE_Option_Descriptor *) malloc (sizeof (SANE_Option_Descriptor)); in word_array_option()
367 (SANE_Option_Descriptor *) malloc (sizeof (SANE_Option_Descriptor)); in string_list_option()
410 (SANE_Option_Descriptor *) malloc (sizeof (SANE_Option_Descriptor)); in wrong_string_list_option()
464 (SANE_Option_Descriptor *) malloc (sizeof (SANE_Option_Descriptor)); in umax_pp()
476 (SANE_Option_Descriptor *) malloc (sizeof (SANE_Option_Descriptor)); in umax_pp()
488 (SANE_Option_Descriptor *) malloc (sizeo in umax_pp()
[all...]
/third_party/musl/libc-test/src/functionalext/supplement/malloc/
H A Drealloc.c16 #include <malloc.h>
66 char *cptr = (char *)malloc(RELLOCTLEN); in realloc_0400()
78 char *cptr = (char *)malloc(RELLOCTLEN); in realloc_0500()
90 char *cptr = (char *)malloc(RELLOCTLEN); in realloc_0600()
/third_party/musl/libc-test/src/functionalext/supplement/malloc/malloc_gtest/
H A Dmalloc_malloc_test.cpp3 #include <malloc.h>
18 * @tc.desc: This test verifies whether the behavior of the malloc function meets expectations, ensuring that the memory
19 * pointer allocated by malloc is not empty and that the allocated memory size meets the expected
25 void* memoryPtr = malloc(LEN); in HWTEST_F()
33 * @tc.desc: This test verifies that after using the malloc function to allocate a memory block of size SIZE, the
39 void* block = malloc(SIZE); in HWTEST_F()
47 * @tc.desc: This test verifies that when using the malloc function to allocate a memory block of size 0, the returned
53 void* memoryBlock = malloc(0); in HWTEST_F()
/third_party/musl/porting/linux/user/src/hook/
H A Dmalloc_common.c5 #include <malloc.h>
21 void* malloc(size_t bytes) in malloc() function
30 return dispatch_table->malloc(bytes); in malloc()
36 return MuslFunc(malloc)(bytes); in malloc()
42 return MuslFunc(malloc)(bytes); in malloc()
44 return dispatch_table->malloc(bytes); in malloc()
49 return MuslFunc(malloc)(bytes); in malloc()
H A Dmusl_preinit_common.c5 #include <malloc.h>
19 .malloc = libc_gwp_asan_malloc,
31 .malloc = MuslFunc(malloc),
/third_party/libuv/test/
H A Dtest-delayed-accept.c34 buf->base = malloc(size); in alloc_cb()
50 uv_tcp_t* accepted_handle = (uv_tcp_t*)malloc(sizeof *accepted_handle); in do_accept()
84 timer_handle = (uv_timer_t*)malloc(sizeof *timer_handle); in connection_cb()
102 uv_tcp_t* server = (uv_tcp_t*)malloc(sizeof *server); in start_server()
154 uv_tcp_t* client = (uv_tcp_t*)malloc(sizeof *client); in client_connect()
155 uv_connect_t* connect_req = malloc(sizeof *connect_req); in client_connect()
/third_party/musl/Benchmark/musl/
H A Dlibc_malloc.cpp17 #include <malloc/malloc.h>
19 #include "malloc.h"
66 char *p = (char *)malloc(size); in Bm_function_realloc_twice()
68 perror("malloc Je_realloc"); in Bm_function_realloc_twice()
84 char *p = (char *)malloc(size); in Bm_function_realloc_half()
86 perror("malloc Je_realloc"); in Bm_function_realloc_half()
102 char *p = (char *)malloc(size); in Bm_function_realloc_equal()
104 perror("malloc Je_realloc"); in Bm_function_realloc_equal()
119 char *p = (char *)malloc(MALLOC_SIZ in Bm_function_malloc_usable_size()
[all...]
/third_party/skia/third_party/externals/harfbuzz/src/
H A Dtest-repacker.cc78 void* out_buffer = malloc (buffer_size); in run_resolve_overflow_test()
787 void* buffer = malloc (buffer_size); in test_sort_kahn_1()
815 void* buffer = malloc (buffer_size); in test_sort_kahn_2()
849 void* buffer = malloc (buffer_size); in test_sort_shortest()
882 void* buffer = malloc (buffer_size); in test_duplicate_leaf()
918 void* buffer = malloc (buffer_size); in test_duplicate_interior()
960 void* buffer_1 = malloc (buffer_size); in test_serialize()
965 void* buffer_2 = malloc (buffer_size); in test_serialize()
983 void* buffer = malloc (buffer_size); in test_will_overflow_1()
996 void* buffer = malloc (buffer_siz in test_will_overflow_2()
[all...]
/third_party/musl/src/locale/
H A Dlocaleconv.c91 g_lconv_icures.decimal_point = (char *)malloc(ICU_BUFFER_SIZE); in refresh_lconv_icures()
92 g_lconv_icures.thousands_sep = (char *)malloc(ICU_BUFFER_SIZE); in refresh_lconv_icures()
93 g_lconv_icures.int_curr_symbol = (char *)malloc(ICU_BUFFER_SIZE); in refresh_lconv_icures()
94 g_lconv_icures.currency_symbol = (char *)malloc(ICU_BUFFER_SIZE); in refresh_lconv_icures()
95 g_lconv_icures.mon_decimal_point = (char *)malloc(ICU_BUFFER_SIZE); in refresh_lconv_icures()
96 g_lconv_icures.mon_thousands_sep = (char *)malloc(ICU_BUFFER_SIZE); in refresh_lconv_icures()
97 g_lconv_icures.positive_sign = (char *)malloc(ICU_BUFFER_SIZE); in refresh_lconv_icures()
98 g_lconv_icures.negative_sign = (char *)malloc(ICU_BUFFER_SIZE); in refresh_lconv_icures()
/base/web/webview/interfaces/kits/cj/src/
H A Dwebview_utils.cpp29 char* res = static_cast<char*>(malloc(sizeof(char) * len)); in MallocCString()
42 char* res = static_cast<char*>(malloc(sizeof(char) * len)); in MallocUInt8()
54 char** result = static_cast<char**>(malloc(sizeof(char*) * vec.size())); in VectorToCArrString()
69 uint8_t* result = static_cast<uint8_t*>(malloc(sizeof(uint8_t) * vec.size())); in VectorToCArrUI8()
/third_party/musl/src/hook/linux/
H A Dmusl_preinit_common.c20 #include <malloc.h>
34 .malloc = libc_gwp_asan_malloc,
46 .malloc = MuslFunc(malloc),
/third_party/musl/libc-test/src/gwp_asan/
H A Dgwp_asan_smoke_test.c16 #include <malloc.h>
29 void *ptr = malloc(SIZE_OF_SINGLE_MALLOC); in test_gwp_asan_oom()
31 t_error("FAIL malloc failed!\n"); in test_gwp_asan_oom()
38 // test we can call default malloc when gwp_asan doesn't have free mem. in test_gwp_asan_oom()
39 void *ptr = malloc(SIZE_OF_SINGLE_MALLOC); in test_gwp_asan_oom()
41 t_error("FAIL malloc failed!\n"); in test_gwp_asan_oom()
46 printf("It's ok call default malloc\n"); in test_gwp_asan_oom()
57 void *ptr = malloc(2); in main()
59 t_error("malloc failed."); in main()
/third_party/pulseaudio/speex/libspeexdsp/
H A Dtestresample.c55 in = malloc(NN*sizeof(short)); in main()
56 out = malloc(2*NN*sizeof(short)); in main()
57 fin = malloc(NN*sizeof(float)); in main()
58 fout = malloc(2*NN*sizeof(float)); in main()
/test/xts/acts/commonlibrary/thirdparty/musl/entry/src/main/cpp/
H A Dctypendk.cpp18 #include <malloc.h>
65 char *ch = static_cast<char *>(malloc(sizeof(char) * length)); in IsalnumL()
84 char *ch = static_cast<char *>(malloc(sizeof(char) * length)); in Isalpha()
103 char *ch = static_cast<char *>(malloc(sizeof(char) * length)); in IsalphaL()
139 char *ch = static_cast<char *>(malloc(sizeof(char) * length)); in Isblank()
158 char *ch = static_cast<char *>(malloc(sizeof(char) * length)); in IsblankL()
211 char *ch = static_cast<char *>(malloc(sizeof(char) * length)); in Isdigit()
229 char *ch = static_cast<char *>(malloc(sizeof(char) * length)); in IsdigitL()
248 char *ch = static_cast<char *>(malloc(sizeof(char) * length)); in Isgraph()
266 char *ch = static_cast<char *>(malloc(sizeo in IsgraphL()
[all...]
/base/request/request/services/src/cxx/
H A Drequest_cert_mgr_adapter.cpp28 *certList = static_cast<struct CertList *>(malloc(sizeof(struct CertList))); in InitCertList()
34 (*certList)->certAbstract = static_cast<struct CertAbstract *>(malloc(buffSize)); in InitCertList()
48 certInfo->certInfo.data = static_cast<uint8_t *>(malloc(MAX_LEN_CERTIFICATE)); in InitCertInfo()
118 struct CRequestCerts *certs = static_cast<struct CRequestCerts *>(malloc(sizeof(struct CRequestCerts))); in GetUserCertsData()
120 REQUEST_HILOGE("GetUserCertsData, malloc CRequestCerts failed"); in GetUserCertsData()
126 static_cast<struct CRequestCert **>(malloc(MAX_COUNT_CERTIFICATE * sizeof(struct CRequestCert *))); in GetUserCertsData()
128 REQUEST_HILOGE("GetUserCertsData, malloc certDataList failed"); in GetUserCertsData()
156 struct CRequestCert *cert = static_cast<struct CRequestCert *>(malloc(sizeof(struct CRequestCert))); in GetUserCertsData()

Completed in 11 milliseconds

12345678910>>...164