| /llvm-project-15.0.7/clang/test/Sema/ |
| H A D | alloc-size.c | 3 void *fail1(int a) __attribute__((alloc_size)); //expected-error{{'alloc_size' attribute takes at l… 4 void *fail2(int a) __attribute__((alloc_size())); //expected-error{{'alloc_size' attribute takes at… 6 void *fail3(int a) __attribute__((alloc_size(0))); //expected-error{{'alloc_size' attribute paramet… 25 void *(*PR31453)(int)__attribute__((alloc_size(1))); 30 void *(__attribute__((alloc_size(1))) * func_ptr1)(int); 31 void *(__attribute__((alloc_size(1, 2))) func_ptr2)(int, int); 42 typedef void *(__attribute__((alloc_size(1))) allocator_function_typdef)(int); 43 typedef void *(__attribute__((alloc_size(1, 2))) * allocator_function_typdef2)(int, int); 44 void *(__attribute__((alloc_size(1, 2))) * allocator_function_typdef3)(int, int); 50 typedef void *(__attribute__((alloc_size(1))) * my_malloc_fn_pointer_type)(int); [all …]
|
| /llvm-project-15.0.7/clang/test/CodeGenCXX/ |
| H A D | alloc-size.cpp | 4 void *my_malloc(int N) __attribute__((alloc_size(1))); 5 void *my_calloc(int N, int M) __attribute__((alloc_size(1, 2))); 46 T *my_malloc(size_t N = sizeof(T)) __attribute__((alloc_size(1))); 49 T *my_calloc(size_t M, size_t N = sizeof(T)) __attribute__((alloc_size(2, 1))); 52 void *dependent_malloc(size_t NT = N) __attribute__((alloc_size(1))); 56 __attribute__((alloc_size(1, 2))); 60 __attribute__((alloc_size(1, 2))); 80 void *my_malloc(const Foo &, int N) __attribute__((alloc_size(2))); 92 void *my_malloc(int N) __attribute__((alloc_size(2))); 93 void *my_calloc(int N, int M) __attribute__((alloc_size(2, 3)));
|
| /llvm-project-15.0.7/clang/test/CodeGen/ |
| H A D | alloc-size-fnptr.c | 11 extern void *my_malloc(int) __attribute__((alloc_size(1))); 12 extern void *my_calloc(int, int) __attribute__((alloc_size(1, 2))); 22 extern void *(*malloc_function_pointer)(void *, int)__attribute__((alloc_size(2))); 23 extern void *(*calloc_function_pointer)(void *, int, int)__attribute__((alloc_size(2, 3))); 35 typedef void *(__attribute__((alloc_size(3))) * my_malloc_fn_pointer_type)(void *, void *, int); 36 typedef void *(__attribute__((alloc_size(3, 4))) * my_calloc_fn_pointer_type)(void *, void *, int, …
|
| H A D | alloc-size.c | 20 void *my_malloc(size_t) __attribute__((alloc_size(1))); 24 void *my_calloc(size_t, size_t) __attribute__((alloc_size(1, 2))); 303 void *my_tiny_malloc(char) __attribute__((alloc_size(1))); 304 void *my_tiny_calloc(char, char) __attribute__((alloc_size(1, 2))); 331 void *my_signed_malloc(long) __attribute__((alloc_size(1))); 332 void *my_signed_calloc(long, long) __attribute__((alloc_size(1, 2))); 361 void *alloc_uchar(unsigned char) __attribute__((alloc_size(1))); 370 void *(*malloc_function_pointer)(int)__attribute__((alloc_size(1))); 371 void *(*calloc_function_pointer)(int, int)__attribute__((alloc_size(1, 2))); 431 typedef void *(__attribute__((warn_unused_result, alloc_size(1))) * my_malloc_function_pointer_type… [all …]
|
| H A D | pass-object-size.c | 62 void *malloc(unsigned long) __attribute__((alloc_size(1)));
|
| /llvm-project-15.0.7/libcxx/benchmarks/ |
| H A D | allocation.bench.cpp | 66 const size_t alloc_size = st.range(0); in BM_AllocateAndDeallocate() local 68 void* p = AllocWrapper::Allocate(alloc_size); in BM_AllocateAndDeallocate() 70 AllocWrapper::Deallocate(p, alloc_size); in BM_AllocateAndDeallocate() 77 const size_t alloc_size = st.range(0); in BM_AllocateOnly() local 81 PointerList* p = (PointerList*)AllocWrapper::Allocate(alloc_size); in BM_AllocateOnly() 91 AllocWrapper::Deallocate(Tmp, alloc_size); in BM_AllocateOnly() 97 const size_t alloc_size = st.range(0); in BM_DeallocateOnly() local 102 p = AllocWrapper::Allocate(alloc_size); in BM_DeallocateOnly() 108 AllocWrapper::Deallocate(*Data, alloc_size); in BM_DeallocateOnly()
|
| /llvm-project-15.0.7/compiler-rt/lib/asan/tests/ |
| H A D | asan_oob_test.cpp | 90 for (size_t alloc_size = 1; alloc_size <= 8; alloc_size++) { in TEST() local 92 void *p = malloc(alloc_size); in TEST() 96 if (offset + access_size <= alloc_size) { in TEST() 99 int outside_bytes = offset > alloc_size ? (offset - alloc_size) : 0; in TEST()
|
| /llvm-project-15.0.7/clang/test/AST/ |
| H A D | attr-print-emit.cpp | 9 void *as2(int, int) __attribute__((alloc_size(1, 2))); 11 void *as1(void *, int) __attribute__((alloc_size(2))); 42 void *as2(int, int) __attribute__((alloc_size(2, 3))); 44 void *as1(void *, int) __attribute__((alloc_size(3)));
|
| /llvm-project-15.0.7/compiler-rt/test/tsan/Darwin/ |
| H A D | mach_vm_allocate.c | 17 const mach_vm_size_t alloc_size = sizeof(int); variable 23 mach_vm_allocate(mach_task_self(), &addr, alloc_size, VM_FLAGS_ANYWHERE); in alloc() 32 mach_vm_allocate(mach_task_self(), &addr, alloc_size, VM_FLAGS_FIXED); in alloc_fixed() 39 mach_vm_deallocate(mach_task_self(), (mach_vm_address_t)ptr, alloc_size); in dealloc()
|
| /llvm-project-15.0.7/compiler-rt/test/scudo/ |
| H A D | random_shuffle.cpp | 17 int alloc_size = argc == 2 ? atoi(argv[1]) : 100; in main() local 18 char *base = new char[alloc_size]; in main() 20 char *p = new char[alloc_size]; in main()
|
| /llvm-project-15.0.7/libc/test/src/sys/mman/linux/ |
| H A D | mmap_test.cpp | 21 size_t alloc_size = 128; in TEST() local 23 void *addr = __llvm_libc::mmap(nullptr, alloc_size, PROT_READ, in TEST() 33 EXPECT_THAT(__llvm_libc::munmap(addr, alloc_size), Succeeds()); in TEST()
|
| /llvm-project-15.0.7/compiler-rt/lib/hwasan/ |
| H A D | hwasan_fuchsia.cpp | 71 uptr alloc_size = UINT64_C(1) << kShadowBaseAlignment; in InitThreads() local 73 MmapAlignedOrDieOnFatalError(alloc_size, alloc_size, __func__)); in InitThreads() 75 InitThreadList(thread_start, alloc_size); in InitThreads()
|
| /llvm-project-15.0.7/libc/loader/linux/aarch64/ |
| H A D | start.cpp | 64 uintptr_t alloc_size = size_of_pointers + padding + app.tls.size; in init_tls() local 70 alloc_size, PROT_READ | PROT_WRITE, in init_tls() 81 tls_descriptor.size = alloc_size; in init_tls()
|
| /llvm-project-15.0.7/libcxxabi/src/ |
| H A D | fallback_malloc.cpp | 92 size_t alloc_size(size_t len) { in alloc_size() function 102 const size_t nelems = alloc_size(len); in fallback_malloc()
|
| /llvm-project-15.0.7/lldb/source/Expression/ |
| H A D | IRMemoryMap.cpp | 91 size_t alloc_size = back->second.m_size; in FindSpace() local 92 ret = llvm::alignTo(addr + alloc_size, 4096); in FindSpace() 158 size_t alloc_size = back->second.m_size; in FindSpace() local 159 ret = llvm::alignTo(addr + alloc_size, 4096); in FindSpace()
|
| /llvm-project-15.0.7/libcxx/test/support/ |
| H A D | controlled_allocators.h | 372 char* aligned_ptr = (char*)::operator new(alloc_size(n*sizeof(T))); in allocate() 411 static std::size_t alloc_size(std::size_t s) { in alloc_size() function
|
| /llvm-project-15.0.7/polly/lib/External/isl/ |
| H A D | isl_pw_templ.c | 23 __isl_give PW *FN(PW,alloc_size)(__isl_take isl_space *space in FN() argument 51 return FN(PW,alloc_size)(space OPT_TYPE_ARG(NO_LOC), 0); in FN() 157 pw = FN(PW,alloc_size)(FN(EL,get_space)(el) OPT_TYPE_ARG(NO_LOC), 1); in FN() 174 dup = FN(PW,alloc_size)(isl_space_copy(pw->dim) in FN() 454 res = FN(PW,alloc_size)(isl_space_copy(pw1->dim) in FN() 523 res = FN(PW,alloc_size)(isl_space_copy(pw->dim) OPT_TYPE_ARG(pw->), n); in FN() 600 res = FN(PW,alloc_size)(isl_space_copy(space) OPT_TYPE_ARG(pw1->), n); in FN()
|
| H A D | isl_pw_union_opt.c | 242 res = FN(PW,alloc_size)(isl_space_copy(pw1->dim), pw1->n + pw2->n); in FN()
|
| /llvm-project-15.0.7/openmp/runtime/src/ |
| H A D | kmp_alloc.cpp | 2013 size_t alloc_size; in ___kmp_fast_allocate() local 2070 alloc_size = size + sizeof(kmp_mem_descr_t) + DCACHE_LINE; in ___kmp_fast_allocate() 2073 __kmp_gtid_from_thread(this_thr), alloc_size)); in ___kmp_fast_allocate() 2074 alloc_ptr = bget(this_thr, (bufsize)alloc_size); in ___kmp_fast_allocate()
|
| /llvm-project-15.0.7/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/ |
| H A D | RenderScriptRuntime.cpp | 2526 const uint32_t alloc_size = *alloc->size.get(); in LoadAllocation() local 2527 if (alloc_size != size) { in LoadAllocation() 2530 (uint64_t)size, alloc_size); in LoadAllocation() 2533 size = alloc_size < size ? alloc_size : size; in LoadAllocation()
|
| /llvm-project-15.0.7/clang/include/clang/Basic/ |
| H A D | AttrDocs.td | 645 The ``alloc_size`` attribute can be placed on functions that return pointers in 647 returned pointer. ``alloc_size`` takes one or two arguments. 649 - ``alloc_size(N)`` implies that argument number N equals the number of 651 - ``alloc_size(N, M)`` implies that the product of argument number N and 657 An example of how to use ``alloc_size`` 661 void *my_malloc(int a) __attribute__((alloc_size(1))); 662 void *my_calloc(int a, int b) __attribute__((alloc_size(1, 2))); 674 this is unimportant, because LLVM has support for the ``alloc_size``
|
| H A D | Attr.td | 1374 let Spellings = [GCC<"alloc_size">];
|
| /llvm-project-15.0.7/compiler-rt/lib/msan/tests/ |
| H A D | msan_test.cpp | 4619 size_t alloc_size = __sanitizer_get_estimated_allocated_size(sizes[i]); in TEST() local 4620 EXPECT_EQ(alloc_size, sizes[i]); in TEST()
|
| /llvm-project-15.0.7/clang/docs/ |
| H A D | LanguageExtensions.rst | 3544 void* my_aligned_allocator(size_t alloc_size, size_t alignment) { 3548 global_alloc_buffer = result + alloc_size;
|