/toolchain/binutils/binutils-2.27/libiberty/ |
xmemdup.c | 8 size_t @var{copy_size}, size_t @var{alloc_size}) 10 Duplicates a region of memory without fail. First, @var{alloc_size} bytes 35 xmemdup (const PTR input, size_t copy_size, size_t alloc_size) 37 PTR output = xmalloc (alloc_size); 38 if (alloc_size > copy_size) 39 memset ((char *) output + copy_size, 0, alloc_size - copy_size);
|
/external/mesa3d/src/gallium/auxiliary/os/ |
os_memory_aligned.h | 62 size_t alloc_size; local 67 * alloc_size = size + alignment + sizeof(void *) 71 if (add_overflow_size_t(size, alignment, &alloc_size) || 72 add_overflow_size_t(alloc_size, sizeof(void *), &alloc_size)) { 76 ptr = (char *) os_malloc(alloc_size);
|
/external/libchrome/base/process/ |
memory.cc | 37 const size_t alloc_size = num_items * size; local 40 if (size && ((alloc_size / size) != num_items)) { 45 if (!UncheckedMalloc(alloc_size, result)) 48 memset(*result, 0, alloc_size);
|
/external/linux-kselftest/tools/testing/selftests/vm/ |
mlock-random-test.c | 125 * With allocated memory chunk [p, p + alloc_size), this 130 * The memory region size alloc_size is within the rlimit. 138 int test_mlock_within_limit(char *p, int alloc_size) 147 if (cur.rlim_cur < alloc_size) { 148 printf("alloc_size[%d] < %u rlimit,lead to mlock failure\n", 149 alloc_size, (unsigned int)cur.rlim_cur); 157 * - choose lock_size randomly but lock_size < alloc_size 159 * < p+alloc_size 162 int lock_size = rand() % alloc_size; 163 int start_offset = rand() % (alloc_size - lock_size) [all...] |
/external/jemalloc/src/ |
chunk_mmap.c | 10 size_t alloc_size; local 12 alloc_size = size + alignment - PAGE; 14 if (alloc_size < size) 19 pages = pages_map(NULL, alloc_size, commit); 24 ret = pages_trim(pages, alloc_size, leadsize, size, commit);
|
/external/strace/tests/ |
tail_alloc.c | 37 const size_t alloc_size = len + 6 * page_size; local 39 void *p = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, 42 perror_msg_and_fail("mmap(%zu)", alloc_size);
|
/external/strace/tests-m32/ |
tail_alloc.c | 37 const size_t alloc_size = len + 6 * page_size; local 39 void *p = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, 42 perror_msg_and_fail("mmap(%zu)", alloc_size);
|
/external/strace/tests-mx32/ |
tail_alloc.c | 37 const size_t alloc_size = len + 6 * page_size; local 39 void *p = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, 42 perror_msg_and_fail("mmap(%zu)", alloc_size);
|
/art/runtime/gc/ |
heap-inl.h | 250 size_t alloc_size, 257 UNLIKELY(IsOutOfMemoryOnAllocation(allocator_type, alloc_size, kGrow))) { 264 alloc_size = RoundUp(alloc_size, space::BumpPointerSpace::kAlignment); 265 ret = bump_pointer_space_->AllocNonvirtual(alloc_size); 267 *bytes_allocated = alloc_size; 268 *usable_size = alloc_size; 269 *bytes_tl_bulk_allocated = alloc_size; 276 size_t max_bytes_tl_bulk_allocated = rosalloc_space_->MaxBytesBulkAllocatedFor(alloc_size); 282 ret = rosalloc_space_->Alloc(self, alloc_size, bytes_allocated, usable_size [all...] |
/system/extras/tests/pagingtest/ |
mmap_test.c | 10 int mmap_test(int test_runs, unsigned long long alloc_size) { 24 buf = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); 34 munmap(buf, alloc_size); 46 munmap(buf, alloc_size); // unreached?
|
pagingtest.h | 16 int mmap_test(int test_runs, unsigned long long alloc_size);
|
pagingtest.c | 16 #define ALLOC_SIZE (10 * 1024 * 1024) 141 unsigned long long alloc_size = 0ULL; local 146 //arguments: <program> [test_runs [alloc_size [file_size]]] 154 alloc_size = strtoull(argv[2], NULL, 10); 156 if (!alloc_size) { 157 alloc_size = ALLOC_SIZE; 166 rc = mmap_test(test_runs, alloc_size);
|
/external/compiler-rt/lib/asan/tests/ |
asan_oob_test.cc | 81 for (size_t alloc_size = 1; alloc_size <= 8; alloc_size++) { 83 void *p = malloc(alloc_size); 84 // allocated: [p, p + alloc_size) 87 if (offset + access_size <= alloc_size) { 90 int outside_bytes = offset > alloc_size ? (offset - alloc_size) : 0;
|
/external/fio/ |
smalloc.c | 155 static bool add_pool(struct pool *pool, unsigned int alloc_size) 165 alloc_size += sizeof(unsigned int); 167 alloc_size += sizeof(struct block_hdr); 168 if (alloc_size < INITIAL_SIZE) 169 alloc_size = INITIAL_SIZE; 172 alloc_size = (alloc_size + SMALLOC_BPL - 1) & ~(SMALLOC_BPL - 1); 173 bitmap_blocks = alloc_size / SMALLOC_BPL; 174 alloc_size += bitmap_blocks * sizeof(unsigned int); 175 pool->mmap_size = alloc_size; 400 size_t alloc_size = size + sizeof(struct block_hdr); local [all...] |
/external/boringssl/src/crypto/buf/ |
buf.c | 101 size_t alloc_size = n * 4; local 102 if (alloc_size / 4 != n) { 108 char *new_buf = OPENSSL_realloc(buf->data, alloc_size); 115 buf->max = alloc_size; 170 size_t alloc_size; local 178 alloc_size = size + 1; 179 if (alloc_size < size) { 184 ret = OPENSSL_malloc(alloc_size);
|
/external/jemalloc/test/integration/ |
iterate.c | 8 static size_t alloc_size; variable 15 alloc_size += size; 34 alloc_size = 0; 64 alloc_size = 0; 96 alloc_size = 0;
|
/external/tensorflow/tensorflow/core/framework/ |
allocator.cc | 82 const std::size_t alloc_size = port::MallocExtension_GetAllocatedSize(p); variable 85 stats_.bytes_in_use += alloc_size; 89 std::max<int64>(stats_.max_alloc_size, alloc_size); 96 const std::size_t alloc_size = variable 99 stats_.bytes_in_use -= alloc_size;
|
/external/v8/src/libplatform/tracing/ |
trace-object.cc | 67 size_t alloc_size = 0; local 69 alloc_size += GetAllocLength(name) + GetAllocLength(scope); 71 alloc_size += GetAllocLength(arg_names_[i]); 81 if (arg_is_copy[i]) alloc_size += GetAllocLength(arg_values_[i].as_string); 84 if (alloc_size) { 88 char* ptr = parameter_copy_storage_ = new char[alloc_size];
|
/external/jemalloc/include/jemalloc/internal/ |
pages.h | 14 void *pages_trim(void *addr, size_t alloc_size, size_t leadsize,
|
/external/libdrm/tests/amdgpu/ |
cs_tests.c | 195 req.alloc_size = 4*1024; 263 req.alloc_size = 4*1024; /* msg */ 264 req.alloc_size += 4*1024; /* fb */ 266 req.alloc_size += 4096; /*it_scaling_table*/ 267 req.alloc_size += ALIGN(sizeof(uvd_bitstream), 4*1024); 268 req.alloc_size += ALIGN(dpb_size, 4*1024); 269 req.alloc_size += ALIGN(dt_size, 4*1024); 278 req.alloc_size, 1, 0, &va, 282 r = amdgpu_bo_va_op(buf_handle, 0, req.alloc_size, va, 0, 372 r = amdgpu_bo_va_op(buf_handle, 0, req.alloc_size, va, 0, AMDGPU_VA_OP_UNMAP) [all...] |
/external/libdrm/amdgpu/ |
amdgpu_bo.c | 98 bo->alloc_size = alloc_buffer->alloc_size; 101 args.in.bo_size = alloc_buffer->alloc_size; 183 info->alloc_size = bo_info.bo_size; 350 output->alloc_size = bo->alloc_size; 393 bo->alloc_size = open_arg.size; 400 bo->alloc_size = dma_buf_size; 416 output->alloc_size = bo->alloc_size; [all...] |
/external/boringssl/src/crypto/lhash/ |
lhash.c | 178 size_t i, alloc_size; local 180 alloc_size = sizeof(LHASH_ITEM *) * new_num_buckets; 181 if (alloc_size / sizeof(LHASH_ITEM*) != new_num_buckets) { 185 new_buckets = OPENSSL_malloc(alloc_size); 189 OPENSSL_memset(new_buckets, 0, alloc_size);
|
/external/boringssl/src/crypto/stack/ |
stack.c | 157 size_t alloc_size = new_alloc * sizeof(void *); local 161 if (new_alloc < sk->num_alloc || alloc_size / sizeof(void *) != new_alloc) { 163 alloc_size = new_alloc * sizeof(void *); 167 if (new_alloc < sk->num_alloc || alloc_size / sizeof(void *) != new_alloc) { 171 data = OPENSSL_realloc(sk->data, alloc_size);
|
/external/libvpx/libvpx/vpx/src/ |
vpx_image.c | 113 uint64_t alloc_size; local 123 alloc_size = (fmt & VPX_IMG_FMT_PLANAR) ? (uint64_t)h * s * bps / 8 126 if (alloc_size != (size_t)alloc_size) goto fail; 128 img->img_data = (uint8_t *)vpx_memalign(buf_align, (size_t)alloc_size);
|
/external/jemalloc/include/jemalloc/ |
jemalloc_macros.h | 70 # define JEMALLOC_ALLOC_SIZE(s) JEMALLOC_ATTR(alloc_size(s)) 71 # define JEMALLOC_ALLOC_SIZE2(s1, s2) JEMALLOC_ATTR(alloc_size(s1, s2))
|