/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()
|
H A D | malloc-0.c | 2 // 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()
|
/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...] |
/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/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/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/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()
|
/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/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),
|
H A D | malloc_common.c | 20 #include <malloc.h> 44 void* malloc(size_t bytes) in malloc() function 58 return dispatch_table->malloc(bytes); in malloc() 64 return MuslFunc(malloc)(bytes); in malloc() 70 return MuslFunc(malloc)(bytes); in malloc() 72 return dispatch_table->malloc(bytes); in malloc() 77 return MuslFunc(malloc)(bytes); in 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/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...] |
/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()
|
/third_party/icu/icu4c/source/test/cintltst/ |
H A D | cmsgtst.c | 67 testCasePatterns[i]=(UChar*)malloc(sizeof(UChar) * strSize); in InitStrings() 72 testResultStrings[i] = (UChar*)malloc(sizeof(UChar) * strSize); in InitStrings() 119 str=(UChar*)malloc(sizeof(UChar) * 7); in MessageFormatTest() 122 result=(UChar*)malloc(sizeof(UChar) * 1); in MessageFormatTest() 166 result=(UChar*)malloc(sizeof(UChar) * resultlength); in MessageFormatTest() 217 result = (UChar*) malloc(U_SIZEOF_UCHAR*resultLength+2); in MessageFormatTest() 290 str=(UChar*)malloc(sizeof(UChar) * 15); in TestSampleMessageFormat() 295 result=(UChar*)malloc(sizeof(UChar) * 1); in TestSampleMessageFormat() 423 result=(UChar*)malloc(sizeof(UChar) * resultlength); in TestNewFormatAndParseAPI() 501 str=(UChar*)malloc(sizeo in TestSampleFormatAndParseWithError() [all...] |
/third_party/jerryscript/jerry-port/default/ |
H A D | default-module.c | 58 uint8_t *buffer_p = (uint8_t *) malloc (file_size); in jerry_port_read_source() 109 char *dir_p = (char *) malloc (_MAX_DIR); in jerry_port_normalize_path() 111 char *path_p = (char *) malloc (_MAX_PATH * 2); in jerry_port_normalize_path() 142 char *buffer_p = (char *) malloc (PATH_MAX); in jerry_port_normalize_path() 143 char *path_p = (char *) malloc (PATH_MAX); in jerry_port_normalize_path()
|
/third_party/curl/packages/OS400/ |
H A D | os400sys.c | 132 buf->buf = malloc(size); in get_buffer() 263 enodename = malloc(nodenamelen); in Curl_getnameinfo_a() 269 eservname = malloc(servnamelen); in Curl_getnameinfo_a() 315 enodename = malloc(i + 1); in Curl_getaddrinfo_a() 326 eservname = malloc(i + 1); in Curl_getaddrinfo_a() 355 char *t = malloc(i); in Curl_gss_convert_in_place() 388 in.value = malloc(i + 1); in Curl_gss_import_name_a() 451 in.value = malloc(i + 1); in Curl_gss_init_sec_context_a() 528 ehost = malloc(i + 1); in Curl_ldap_init_a() 552 edn = malloc( in Curl_ldap_simple_bind_s_a() [all...] |