/third_party/unity/extras/memory/test/ |
H A D | unity_memory_Test.c | 59 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...] |
/third_party/lz4/ossfuzz/ |
H A D | round_trip_fuzzer.c | 25 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 D | malloc-random.c | 33 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/linux/linux-6.6/tools/net/ynl/generated/ |
H A D | devlink-user.h | 96 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...] |
/kernel/liteos_a/apps/lms/src/ |
H A D | sample_usr_lms.c | 55 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()
|
/third_party/cJSON/tests/unity/extras/fixture/test/ |
H A D | unity_fixture_Test.c | 52 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 D | hmm-tests.c | 306 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 D | sanei_config_test.c | 179 (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/skia/third_party/externals/harfbuzz/src/ |
H A D | test-repacker.cc | 78 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/porting/linux/user/src/hook/ |
H A D | malloc_common.c | 5 #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 D | musl_preinit_common.c | 5 #include <malloc.h> 19 .malloc = libc_gwp_asan_malloc, 31 .malloc = MuslFunc(malloc),
|
/third_party/cJSON/tests/ |
H A D | minify_tests.c | 48 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 D | test-delayed-accept.c | 34 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 D | libc_malloc.cpp | 17 #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/src/locale/ |
H A D | localeconv.c | 91 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/libc-test/src/functionalext/supplement/malloc/ |
H A D | realloc.c | 16 #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 D | malloc_malloc_test.cpp | 3 #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()
|
/test/xts/acts/commonlibrary/thirdparty/musl/entry/src/main/cpp/ |
H A D | ctypendk.cpp | 18 #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...] |
/third_party/musl/src/hook/linux/ |
H A D | musl_preinit_common.c | 20 #include <malloc.h> 34 .malloc = libc_gwp_asan_malloc, 46 .malloc = MuslFunc(malloc),
|
/third_party/musl/libc-test/src/gwp_asan/ |
H A D | gwp_asan_smoke_test.c | 16 #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 D | testresample.c | 55 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()
|
/third_party/selinux/libsepol/src/ |
H A D | node_record.c | 99 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...] |
/third_party/lz4/examples/ |
H A D | blockStreaming_lineByLine.c | 45 char* const cmpBuf = (char*) malloc(cmpBufBytes); in test_compress() 46 char* const inpBuf = (char*) malloc(ringBufferBytes); in test_compress() 93 char* const cmpBuf = (char*) malloc(LZ4_COMPRESSBOUND(messageMaxBytes)); in test_decompress() 94 char* const decBuf = (char*) malloc(ringBufferBytes); in test_decompress() 128 char* const b0 = (char*) malloc(tempBufferBytes); in compare() 129 char* const b1 = (char*) malloc(tempBufferBytes); in compare()
|
/kernel/linux/linux-5.10/tools/testing/selftests/vm/ |
H A D | hmm-tests.c | 234 buffer = malloc(sizeof(*buffer)); in TEST_F() 239 buffer->mirror = malloc(size); in TEST_F() 297 buffer = malloc(sizeof(*buffer)); in TEST_F() 302 buffer->mirror = malloc(size); in TEST_F() 356 buffer = malloc(sizeof(*buffer)); in TEST_F() 361 buffer->mirror = malloc(size); in TEST_F() 404 buffer = malloc(sizeof(*buffer)); in TEST_F() 409 buffer->mirror = malloc(size); in TEST_F() 472 buffer = malloc(sizeof(*buffer)); in TEST_F() 477 buffer->mirror = malloc(siz in TEST_F() [all...] |
/third_party/pcre2/pcre2/src/ |
H A D | pcre2_context.c | 51 * Default malloc/free functions * 59 return malloc(size); in default_malloc() 89 void *yield = (memctl == NULL)? malloc(size) : in memctl_malloc() 90 memctl->malloc(size, memctl->memory_data); in memctl_malloc() 95 newmemctl->malloc = default_malloc; in memctl_malloc() 123 gcontext->memctl.malloc = private_malloc; in pcre2_general_context_create() 232 gcontext->memctl.malloc(sizeof(pcre2_real_general_context), in pcre2_general_context_copy() 244 ccontext->memctl.malloc(sizeof(pcre2_real_compile_context), in pcre2_compile_context_copy() 256 mcontext->memctl.malloc(sizeof(pcre2_real_match_context), in pcre2_match_context_copy() 269 ccontext->memctl.malloc(sizeo in pcre2_convert_context_copy() [all...] |