/external/llvm-project/clang/test/Sema/ |
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… 7 void *fail4(int a) __attribute__((alloc_size(2))); //expected-error{{'alloc_size' attribute paramet… 9 void *fail5(int a, int b) __attribute__((alloc_size(0, 1))); //expected-error{{'alloc_size' attribu… 10 void *fail6(int a, int b) __attribute__((alloc_size(3, 1))); //expected-error{{'alloc_size' attribu… 12 void *fail7(int a, int b) __attribute__((alloc_size(1, 0))); //expected-error{{'alloc_size' attribu… 13 void *fail8(int a, int b) __attribute__((alloc_size(1, 3))); //expected-error{{'alloc_size' attribu… 15 int fail9(int a) __attribute__((alloc_size(1))); //expected-warning{{'alloc_size' attribute only ap… 17 int fail10 __attribute__((alloc_size(1))); //expected-warning{{'alloc_size' attribute only applies … [all …]
|
/external/llvm-project/clang/test/CodeGenCXX/ |
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)));
|
/external/linux-kselftest/tools/testing/selftests/vm/ |
D | mlock-random-test.c | 138 int test_mlock_within_limit(char *p, int alloc_size) in test_mlock_within_limit() argument 147 if (cur.rlim_cur < alloc_size) { in test_mlock_within_limit() 149 alloc_size, (unsigned int)cur.rlim_cur); in test_mlock_within_limit() 162 int lock_size = rand() % alloc_size; in test_mlock_within_limit() 163 int start_offset = rand() % (alloc_size - lock_size); in test_mlock_within_limit() 174 p, alloc_size, in test_mlock_within_limit() 190 if (locked_vm_size > PAGE_ALIGN(alloc_size, page_size) + page_size) { in test_mlock_within_limit() 192 locked_vm_size, alloc_size); in test_mlock_within_limit() 215 int test_mlock_outof_limit(char *p, int alloc_size) in test_mlock_outof_limit() argument 223 if (cur.rlim_cur >= alloc_size) { in test_mlock_outof_limit() [all …]
|
/external/llvm-project/libcxx/benchmarks/ |
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 103 p = AllocWrapper::Allocate(alloc_size); in BM_DeallocateOnly() 109 AllocWrapper::Deallocate(*Data, alloc_size); in BM_DeallocateOnly()
|
/external/virglrenderer/src/ |
D | vrend_strbuf.h | 41 size_t alloc_size; member 72 sb->alloc_size = initial_size; in strbuf_alloc() 84 if (sb->size + len + 1 > sb->alloc_size) { in strbuf_grow() 88 size_t new_size = MAX2(sb->size + len + 1, sb->alloc_size + STRBUF_MIN_MALLOC); in strbuf_grow() 95 sb->alloc_size = new_size; in strbuf_grow() 121 int len = vsnprintf(sb->buf + sb->size, sb->alloc_size - sb->size, fmt, ap); in strbuf_vappendf() 122 if (len >= (int)(sb->alloc_size - sb->size)) { in strbuf_vappendf() 125 vsnprintf(sb->buf + sb->size, sb->alloc_size - sb->size, fmt, cp); in strbuf_vappendf() 144 int len = vsnprintf(sb->buf, sb->alloc_size, fmt, ap); in strbuf_vfmt() 145 if (len >= (int)(sb->alloc_size)) { in strbuf_vfmt() [all …]
|
/external/rust/crates/grpcio-sys/grpc/src/core/lib/gprpp/ |
D | arena.cc | 40 size_t alloc_size = base_size + initial_size; in ArenaStorage() local 46 return gpr_malloc_aligned(alloc_size, alignment); in ArenaStorage() 68 size_t alloc_size) { in CreateWithAlloc() argument 72 new (ArenaStorage(initial_size)) Arena(initial_size, alloc_size); in CreateWithAlloc() 92 size_t alloc_size = zone_base_size + size; in AllocZone() local 93 Zone* z = new (gpr_malloc_aligned(alloc_size, GPR_MAX_ALIGNMENT)) Zone(); in AllocZone()
|
/external/compiler-rt/lib/asan/tests/ |
D | asan_oob_test.cc | 81 for (size_t alloc_size = 1; alloc_size <= 8; alloc_size++) { in TEST() local 83 void *p = malloc(alloc_size); in TEST() 87 if (offset + access_size <= alloc_size) { in TEST() 90 int outside_bytes = offset > alloc_size ? (offset - alloc_size) : 0; in TEST()
|
/external/libcups/examples/ |
D | ppdx.c | 55 size_t alloc_size; /* Allocated size of data buffer */ in ppdxReadData() local 83 alloc_size = 256; in ppdxReadData() 129 if (alloc_size < 2048) in ppdxReadData() 130 temp_size = alloc_size * 2; in ppdxReadData() 131 else if (alloc_size < PPDX_MAX_DATA) in ppdxReadData() 132 temp_size = alloc_size + 2048; in ppdxReadData() 143 decomp.avail_out = temp_size - alloc_size; in ppdxReadData() 145 alloc_size = temp_size; in ppdxReadData()
|
/external/llvm-project/compiler-rt/lib/asan/tests/ |
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()
|
/external/libdrm/tests/amdgpu/ |
D | cs_tests.c | 215 req.alloc_size = 4*1024; in amdgpu_cs_uvd_create() 286 req.alloc_size = 4*1024; /* msg */ in amdgpu_cs_uvd_decode() 287 req.alloc_size += 4*1024; /* fb */ in amdgpu_cs_uvd_decode() 289 req.alloc_size += 4096; /*it_scaling_table*/ in amdgpu_cs_uvd_decode() 290 req.alloc_size += ALIGN(sizeof(uvd_bitstream), 4*1024); in amdgpu_cs_uvd_decode() 291 req.alloc_size += ALIGN(dpb_size, 4*1024); in amdgpu_cs_uvd_decode() 292 req.alloc_size += ALIGN(dt_size, 4*1024); in amdgpu_cs_uvd_decode() 301 req.alloc_size, 1, 0, &va, in amdgpu_cs_uvd_decode() 305 r = amdgpu_bo_va_op(buf_handle, 0, req.alloc_size, va, 0, in amdgpu_cs_uvd_decode() 407 r = amdgpu_bo_va_op(buf_handle, 0, req.alloc_size, va, 0, AMDGPU_VA_OP_UNMAP); in amdgpu_cs_uvd_decode() [all …]
|
/external/mesa3d/src/util/ |
D | os_memory_aligned.h | 74 size_t alloc_size; in os_malloc_aligned() local 83 if (add_overflow_size_t(size, alignment, &alloc_size) || in os_malloc_aligned() 84 add_overflow_size_t(alloc_size, sizeof(void *), &alloc_size)) { in os_malloc_aligned() 88 ptr = (char *) os_malloc(alloc_size); in os_malloc_aligned()
|
/external/jemalloc_new/test/unit/ |
D | pages.c | 4 size_t alloc_size; in TEST_BEGIN() local 8 alloc_size = HUGEPAGE * 2 - PAGE; in TEST_BEGIN() 10 pages = pages_map(NULL, alloc_size, PAGE, &commit); in TEST_BEGIN() 21 pages_unmap(pages, alloc_size); in TEST_BEGIN()
|
/external/libchrome/base/process/ |
D | memory.cc | 37 const size_t alloc_size = num_items * size; in UncheckedCalloc() local 40 if (size && ((alloc_size / size) != num_items)) { in UncheckedCalloc() 45 if (!UncheckedMalloc(alloc_size, result)) in UncheckedCalloc() 48 memset(*result, 0, alloc_size); in UncheckedCalloc()
|
/external/tensorflow/tensorflow/core/common_runtime/gpu/ |
D | pool_allocator_test.cc | 133 int64 alloc_size = 0; in TEST() local 135 [&alloc_count, &alloc_size](void* ptr, int numa_node, int64 size) { in TEST() 137 alloc_size += size; in TEST() 156 EXPECT_EQ(0, alloc_size); in TEST() 169 EXPECT_EQ(16 + (alloc_count * kChunkPrefixSize), alloc_size); in TEST() 181 EXPECT_EQ(16 + (alloc_count * kChunkPrefixSize), alloc_size); in TEST() 196 EXPECT_EQ(16 + 4 + 2 + (alloc_count * kChunkPrefixSize), alloc_size); in TEST() 206 EXPECT_EQ(16 + 4 + 2 + (alloc_count * kChunkPrefixSize), alloc_size); in TEST() 223 EXPECT_EQ(16 + 4 + 2 + (alloc_count * kChunkPrefixSize), alloc_size); in TEST() 233 EXPECT_EQ(16 + 4 + 2 + (alloc_count * kChunkPrefixSize), alloc_size); in TEST()
|
/external/virglrenderer/tests/ |
D | test_virgl_strbuf.c | 36 ck_assert_int_eq(sb.alloc_size, 1024); in START_TEST() 93 ck_assert_int_eq(sb.alloc_size, 128 + STRBUF_MIN_MALLOC); in START_TEST() 113 ck_assert_int_eq(sb.alloc_size, 2048); in START_TEST() 114 ck_assert_int_ge(sb.alloc_size, strbuf_get_len(&sb) + 1); in START_TEST() 133 ck_assert_int_eq(sb.alloc_size, 128); in START_TEST() 134 ck_assert_int_ge(sb.alloc_size, strbuf_get_len(&sb) + 1); in START_TEST() 155 ck_assert_int_ge(sb.alloc_size, strbuf_get_len(&sb) + 1); in START_TEST() 156 ck_assert_int_gt(sb.alloc_size, 1024); in START_TEST()
|
/external/llvm-project/clang/test/AST/ |
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)));
|
/external/llvm-project/compiler-rt/test/tsan/Darwin/ |
D | mach_vm_allocate.c | 14 const mach_vm_size_t alloc_size = sizeof(int); variable 20 mach_vm_allocate(mach_task_self(), &addr, alloc_size, VM_FLAGS_ANYWHERE); in alloc() 29 mach_vm_allocate(mach_task_self(), &addr, alloc_size, VM_FLAGS_FIXED); in alloc_fixed() 36 mach_vm_deallocate(mach_task_self(), (mach_vm_address_t)ptr, alloc_size); in dealloc()
|
/external/llvm-project/compiler-rt/test/scudo/ |
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()
|
/external/tensorflow/tensorflow/core/framework/ |
D | cpu_allocator_impl.cc | 87 const std::size_t alloc_size = port::MallocExtension_GetAllocatedSize(p); in AllocateRaw() local 90 stats_.bytes_in_use += alloc_size; in AllocateRaw() 94 std::max<int64>(stats_.largest_alloc_size, alloc_size); in AllocateRaw() 109 const std::size_t alloc_size = in DeallocateRaw() local 112 stats_.bytes_in_use -= alloc_size; in DeallocateRaw()
|
/external/linux-kselftest/tools/testing/selftests/powerpc/stringloops/ |
D | memcmp.c | 76 unsigned long alloc_size = comp_size + MAX_OFFSET_DIFF_S1_S2; in testcase() local 79 s1 = memalign(128, alloc_size); in testcase() 85 s2 = memalign(128, alloc_size); in testcase() 99 for (j = 0; j < alloc_size; j++) in testcase() 125 for (j = 0; j < alloc_size; j++) in testcase()
|
/external/llvm-project/libc/test/src/sys/mman/linux/ |
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()
|
/external/llvm-project/clang/test/CodeGen/ |
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)));
|
/external/libwebsockets/lib/misc/lwsac/ |
D | lwsac.c | 84 if (bf->alloc_size - bf->ofs < lwsac_align(amount)) in lwsac_extend() 114 if (bf->alloc_size - bf->ofs >= ensure) in _lwsac_use() 125 if (bf->alloc_size - bf->ofs >= ensure) in _lwsac_use() 181 bf->alloc_size = alloc; in _lwsac_use() 195 if (bf->ofs >= bf->alloc_size) in _lwsac_use() 196 bf->ofs = bf->alloc_size; in _lwsac_use() 242 overhead += (head->alloc_size - head->ofs) + sizeof(*head); in lwsac_total_overhead()
|
/external/libdrm/amdgpu/ |
D | amdgpu_bo.c | 70 bo->alloc_size = size; in amdgpu_bo_create() 86 args.in.bo_size = alloc_buffer->alloc_size; in amdgpu_bo_alloc() 100 r = amdgpu_bo_create(dev, alloc_buffer->alloc_size, args.out.handle, in amdgpu_bo_alloc() 170 info->alloc_size = bo_info.bo_size; in amdgpu_bo_query_info() 264 uint64_t alloc_size = 0; in amdgpu_bo_import() local 321 output->alloc_size = bo->alloc_size; in amdgpu_bo_import() 335 alloc_size = open_arg.size; in amdgpu_bo_import() 355 alloc_size = dma_buf_size; in amdgpu_bo_import() 364 r = amdgpu_bo_create(dev, alloc_size, handle, &bo); in amdgpu_bo_import() 378 output->alloc_size = bo->alloc_size; in amdgpu_bo_import() [all …]
|
/external/strace/tests-m32/ |
D | tail_alloc.c | 37 const size_t alloc_size = len + 6 * page_size; in tail_alloc() local 39 void *p = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, in tail_alloc() 42 perror_msg_and_fail("mmap(%zu)", alloc_size); in tail_alloc()
|