/external/cronet/base/allocator/partition_allocator/shim/ |
D | allocator_shim_default_dispatch_to_partition_alloc_unittest.cc | 111 constexpr size_t alloc_size = 100; in TEST() local 112 void* data = PartitionCalloc(nullptr, 1, alloc_size, nullptr); in TEST() 115 char* zeroes[alloc_size]; in TEST() 116 memset(zeroes, 0, alloc_size); in TEST() 118 EXPECT_EQ(0, memcmp(zeroes, data, alloc_size)); in TEST() 123 constexpr size_t alloc_size = 100; in TEST() local 125 void* data = PartitionMemalign(nullptr, alignment, alloc_size, nullptr); in TEST() 132 for (size_t alloc_size : {100, 100000, 10000000}) { in TEST() 137 PartitionAlignedAlloc(nullptr, alloc_size, alignment, nullptr); in TEST() 146 for (size_t alloc_size : {100, 100000, 10000000}) { in TEST() [all …]
|
/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/cronet/buildtools/third_party/libc++/trunk/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 102 p = AllocWrapper::Allocate(alloc_size); in BM_DeallocateOnly() 108 AllocWrapper::Deallocate(*Data, alloc_size); in BM_DeallocateOnly()
|
/external/virglrenderer/src/ |
D | vrend_strbuf.h | 41 size_t alloc_size; member 80 sb->alloc_size = initial_size; in strbuf_alloc() 92 sb->alloc_size = size; in strbuf_alloc_fixed() 106 if (sb->size + len + 1 > sb->alloc_size) { in strbuf_grow() 116 size_t new_size = MAX2(sb->size + len + 1, sb->alloc_size + STRBUF_MIN_MALLOC); in strbuf_grow() 123 sb->alloc_size = new_size; in strbuf_grow() 149 int len = vsnprintf(sb->buf + sb->size, sb->alloc_size - sb->size, fmt, ap); in strbuf_vappendf() 150 if (len >= (int)(sb->alloc_size - sb->size)) { in strbuf_vappendf() 154 vsnprintf(sb->buf + sb->size, sb->alloc_size - sb->size, fmt, cp); in strbuf_vappendf() 175 int len = vsnprintf(sb->buf, sb->alloc_size, fmt, ap); 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/cronet/base/trace_event/ |
D | trace_arguments.cc | 145 void StringStorage::Reset(size_t alloc_size) { in Reset() argument 146 if (!alloc_size) { in Reset() 150 } else if (!data_ || alloc_size != data_->size) { in Reset() 151 data_ = static_cast<Data*>(::realloc(data_, sizeof(size_t) + alloc_size)); in Reset() 152 data_->size = alloc_size; in Reset() 261 size_t alloc_size = 0; in CopyStringsTo() local 264 alloc_size += in CopyStringsTo() 267 alloc_size += GetAllocLength(names_[n]); in CopyStringsTo() 273 alloc_size += GetAllocLength(values_[n].as_string); in CopyStringsTo() 276 if (alloc_size) { in CopyStringsTo() [all …]
|
/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/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/libdrm/tests/amdgpu/ |
D | cs_tests.c | 214 req.alloc_size = 4*1024; in amdgpu_cs_uvd_create() 285 req.alloc_size = 4*1024; /* msg */ in amdgpu_cs_uvd_decode() 286 req.alloc_size += 4*1024; /* fb */ in amdgpu_cs_uvd_decode() 288 req.alloc_size += 4096; /*it_scaling_table*/ in amdgpu_cs_uvd_decode() 289 req.alloc_size += ALIGN(sizeof(uvd_bitstream), 4*1024); in amdgpu_cs_uvd_decode() 290 req.alloc_size += ALIGN(dpb_size, 4*1024); in amdgpu_cs_uvd_decode() 291 req.alloc_size += ALIGN(dt_size, 4*1024); in amdgpu_cs_uvd_decode() 300 req.alloc_size, 1, 0, &va, in amdgpu_cs_uvd_decode() 304 r = amdgpu_bo_va_op(buf_handle, 0, req.alloc_size, va, 0, in amdgpu_cs_uvd_decode() 406 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/virglrenderer/src/mesa/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/tensorflow/tensorflow/core/common_runtime/gpu/ |
D | pool_allocator_test.cc | 133 int64_t alloc_size = 0; in TEST() local 135 [&alloc_count, &alloc_size](void* ptr, int numa_node, int64_t 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/cronet/base/process/ |
D | memory.cc | 35 const size_t alloc_size = num_items * size; in UncheckedCalloc() local 38 if (size && ((alloc_size / size) != num_items)) { in UncheckedCalloc() 43 if (!UncheckedMalloc(alloc_size, result)) in UncheckedCalloc() 46 memset(*result, 0, alloc_size); in UncheckedCalloc()
|
/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/framework/ |
D | cpu_allocator_impl.cc | 89 const std::size_t alloc_size = port::MallocExtension_GetAllocatedSize(p); in AllocateRaw() local 92 stats_.bytes_in_use += alloc_size; in AllocateRaw() 96 std::max<int64_t>(stats_.largest_alloc_size, alloc_size); in AllocateRaw() 106 AddTraceMe("MemoryAllocation", p, num_bytes, alloc_size); in AllocateRaw() 114 const std::size_t alloc_size = in DeallocateRaw() local 117 stats_.bytes_in_use -= alloc_size; in DeallocateRaw() 118 AddTraceMe("MemoryDeallocation", ptr, 0, alloc_size); in DeallocateRaw()
|
/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/linux-kselftest/tools/testing/selftests/powerpc/stringloops/ |
D | memcmp.c | 76 unsigned long i, comp_size, alloc_size; in testcase() local 81 alloc_size = comp_size + MAX_OFFSET_DIFF_S1_S2; in testcase() 89 s1 = p + MAP_SIZE - alloc_size; in testcase() 90 s2 = p + 3 * MAP_SIZE - alloc_size; in testcase() 104 for (j = 0; j < alloc_size; j++) in testcase() 130 for (j = 0; j < alloc_size; j++) in testcase()
|
/external/libdrm/amdgpu/ |
D | amdgpu_bo.c | 62 bo->alloc_size = size; in amdgpu_bo_create() 78 args.in.bo_size = alloc_buffer->alloc_size; in amdgpu_bo_alloc() 92 r = amdgpu_bo_create(dev, alloc_buffer->alloc_size, args.out.handle, in amdgpu_bo_alloc() 162 info->alloc_size = bo_info.bo_size; in amdgpu_bo_query_info() 256 uint64_t alloc_size = 0; in amdgpu_bo_import() local 313 output->alloc_size = bo->alloc_size; in amdgpu_bo_import() 327 alloc_size = open_arg.size; in amdgpu_bo_import() 347 alloc_size = dma_buf_size; in amdgpu_bo_import() 356 r = amdgpu_bo_create(dev, alloc_size, handle, &bo); in amdgpu_bo_import() 370 output->alloc_size = bo->alloc_size; in amdgpu_bo_import() [all …]
|
/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/boringssl/src/crypto/buf/ |
D | buf.c | 99 size_t alloc_size = n * 4; in BUF_MEM_reserve() local 100 if (alloc_size / 4 != n) { in BUF_MEM_reserve() 105 char *new_buf = OPENSSL_realloc(buf->data, alloc_size); in BUF_MEM_reserve() 111 buf->max = alloc_size; in BUF_MEM_reserve()
|
/external/rust/crates/quiche/deps/boringssl/src/crypto/buf/ |
D | buf.c | 101 size_t alloc_size = n * 4; in BUF_MEM_reserve() local 102 if (alloc_size / 4 != n) { in BUF_MEM_reserve() 108 char *new_buf = OPENSSL_realloc(buf->data, alloc_size); in BUF_MEM_reserve() 115 buf->max = alloc_size; in BUF_MEM_reserve()
|
/external/cronet/third_party/boringssl/src/crypto/buf/ |
D | buf.c | 99 size_t alloc_size = n * 4; in BUF_MEM_reserve() local 100 if (alloc_size / 4 != n) { in BUF_MEM_reserve() 105 char *new_buf = OPENSSL_realloc(buf->data, alloc_size); in BUF_MEM_reserve() 111 buf->max = alloc_size; in BUF_MEM_reserve()
|
/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()
|
/external/strace/tests/ |
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()
|