Home
last modified time | relevance | path

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

12345678910>>...189

/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...]
/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()
/kernel/liteos_a/apps/lms/src/
H A Dsample_usr_lms.c55 char *buf = (char *)malloc(TEST_SIZE); in LmsMallocTest()
73 char *buf = (char *)malloc(TEST_SIZE); in LmsReallocTest()
135 char *buf = (char *)malloc(TEST_SIZE); in LmsMemsetTest()
149 char *buf = (char *)malloc(TEST_SIZE); in LmsMemcpyTest()
164 char *buf = (char *)malloc(TEST_SIZE); in LmsMemmoveTest()
178 char *buf = (char *)malloc(TEST_SIZE); in LmsStrcpyTest()
194 char *buf = (char *)malloc(TEST_SIZE); in LmsStrcatTest()
214 char *buf = (char *)malloc(TEST_SIZE); in LmsFreeTest()
232 char *tmp = (char *)malloc(5000); /* 5000: test mem size */ in main()
/kernel/linux/linux-6.6/tools/net/ynl/generated/
H A Ddevlink-user.h96 req->bus_name = malloc(req->_present.bus_name_len + 1); in devlink_get_req_set_bus_name()
105 req->dev_name = malloc(req->_present.dev_name_len + 1); in devlink_get_req_set_dev_name()
170 req->bus_name = malloc(req->_present.bus_name_len + 1); in devlink_port_get_req_set_bus_name()
180 req->dev_name = malloc(req->_present.dev_name_len + 1); in devlink_port_get_req_set_dev_name()
236 req->bus_name = malloc(req->_present.bus_name_len + 1); in devlink_port_get_req_dump_set_bus_name()
246 req->dev_name = malloc(req->_present.dev_name_len + 1); in devlink_port_get_req_dump_set_dev_name()
300 req->bus_name = malloc(req->_present.bus_name_len + 1); in devlink_sb_get_req_set_bus_name()
310 req->dev_name = malloc(req->_present.dev_name_len + 1); in devlink_sb_get_req_set_dev_name()
365 req->bus_name = malloc(req->_present.bus_name_len + 1); in devlink_sb_get_req_dump_set_bus_name()
375 req->dev_name = malloc(re in devlink_sb_get_req_dump_set_dev_name()
[all...]
/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...]
/kernel/linux/linux-6.6/tools/testing/selftests/mm/
H A Dhmm-tests.c306 buffer = malloc(sizeof(*buffer)); in TEST_F()
311 buffer->mirror = malloc(size); in TEST_F()
369 buffer = malloc(sizeof(*buffer)); in TEST_F()
374 buffer->mirror = malloc(size); in TEST_F()
428 buffer = malloc(sizeof(*buffer)); in TEST_F()
433 buffer->mirror = malloc(size); in TEST_F()
476 buffer = malloc(sizeof(*buffer)); in TEST_F()
481 buffer->mirror = malloc(size); in TEST_F()
544 buffer = malloc(sizeof(*buffer)); in TEST_F()
549 buffer->mirror = malloc(siz in TEST_F()
[all...]
/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/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/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/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/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/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()
/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...]
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/test/unittest/
H A Dpixel_convert_adapter_test.cpp55 void *srcPixels = malloc(bufferSize); in HWTEST_F()
68 void *dstPixels = malloc(bufferSize1); in HWTEST_F()
121 void *srcPixels = malloc(bufferSize); in HWTEST_F()
134 void *dstPixels = malloc(bufferSize1); in HWTEST_F()
191 void *srcPixels = malloc(bufferSize); in HWTEST_F()
240 void *srcPixels = malloc(bufferSize); in HWTEST_F()
253 void *dstPixels = malloc(bufferSize1); in HWTEST_F()
283 void *srcPixels = malloc(bufferSize); in HWTEST_F()
296 void *dstPixels = malloc(bufferSize1); in HWTEST_F()
326 void *srcPixels = malloc(bufferSiz in HWTEST_F()
[all...]
/third_party/selinux/libsepol/src/
H A Dnode_record.c99 tmp_addr = malloc(4); in node_alloc_addr()
106 tmp_addr = malloc(16); in node_alloc_addr()
192 tmp_addr = malloc(INET_ADDRSTRLEN); in node_alloc_addr_string()
198 tmp_addr = malloc(INET6_ADDRSTRLEN); in node_alloc_addr_string()
281 tmp_key->addr = malloc(node->addr_sz); in sepol_node_key_extract()
282 tmp_key->mask = malloc(node->mask_sz); in sepol_node_key_extract()
379 char *tmp_buf = malloc(node->addr_sz); in sepol_node_get_addr_bytes()
422 char *tmp_addr = malloc(addr_sz); in sepol_node_set_addr_bytes()
464 char *tmp_buf = malloc(node->mask_sz); in sepol_node_get_mask_bytes()
507 char *tmp_mask = malloc(mask_s in sepol_node_set_mask_bytes()
[all...]

Completed in 21 milliseconds

12345678910>>...189