Home
last modified time | relevance | path

Searched refs:alloc_size (Results 1 – 25 of 74) sorted by relevance

123

/external/linux-kselftest/tools/testing/selftests/vm/
Dmlock-random-test.c138 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/fio/
Dsmalloc.c155 static bool add_pool(struct pool *pool, unsigned int alloc_size) in add_pool() argument
165 alloc_size += sizeof(unsigned int); in add_pool()
167 alloc_size += sizeof(struct block_hdr); in add_pool()
168 if (alloc_size < INITIAL_SIZE) in add_pool()
169 alloc_size = INITIAL_SIZE; in add_pool()
172 alloc_size = (alloc_size + SMALLOC_BPL - 1) & ~(SMALLOC_BPL - 1); in add_pool()
173 bitmap_blocks = alloc_size / SMALLOC_BPL; in add_pool()
174 alloc_size += bitmap_blocks * sizeof(unsigned int); in add_pool()
175 pool->mmap_size = alloc_size; in add_pool()
186 ptr = mmap(NULL, alloc_size, PROT_READ|PROT_WRITE, mmap_flags, -1, 0); in add_pool()
[all …]
/external/libdrm/tests/amdgpu/
Dcs_tests.c195 req.alloc_size = 4*1024; in amdgpu_cs_uvd_create()
263 req.alloc_size = 4*1024; /* msg */ in amdgpu_cs_uvd_decode()
264 req.alloc_size += 4*1024; /* fb */ in amdgpu_cs_uvd_decode()
266 req.alloc_size += 4096; /*it_scaling_table*/ in amdgpu_cs_uvd_decode()
267 req.alloc_size += ALIGN(sizeof(uvd_bitstream), 4*1024); in amdgpu_cs_uvd_decode()
268 req.alloc_size += ALIGN(dpb_size, 4*1024); in amdgpu_cs_uvd_decode()
269 req.alloc_size += ALIGN(dt_size, 4*1024); in amdgpu_cs_uvd_decode()
278 req.alloc_size, 1, 0, &va, in amdgpu_cs_uvd_decode()
282 r = amdgpu_bo_va_op(buf_handle, 0, req.alloc_size, va, 0, in amdgpu_cs_uvd_decode()
372 r = amdgpu_bo_va_op(buf_handle, 0, req.alloc_size, va, 0, AMDGPU_VA_OP_UNMAP); in amdgpu_cs_uvd_decode()
[all …]
/external/boringssl/src/crypto/buf/
Dbuf.c101 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()
170 size_t alloc_size; in BUF_strndup() local
178 alloc_size = size + 1; in BUF_strndup()
179 if (alloc_size < size) { in BUF_strndup()
184 ret = OPENSSL_malloc(alloc_size); in BUF_strndup()
/external/mesa3d/src/gallium/auxiliary/os/
Dos_memory_aligned.h62 size_t alloc_size; in os_malloc_aligned() local
71 if (add_overflow_size_t(size, alignment, &alloc_size) || in os_malloc_aligned()
72 add_overflow_size_t(alloc_size, sizeof(void *), &alloc_size)) { in os_malloc_aligned()
76 ptr = (char *) os_malloc(alloc_size); in os_malloc_aligned()
/external/compiler-rt/lib/asan/tests/
Dasan_oob_test.cc81 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/jemalloc/src/
Dchunk_mmap.c10 size_t alloc_size; in chunk_alloc_mmap_slow() local
12 alloc_size = size + alignment - PAGE; in chunk_alloc_mmap_slow()
14 if (alloc_size < size) in chunk_alloc_mmap_slow()
19 pages = pages_map(NULL, alloc_size, commit); in chunk_alloc_mmap_slow()
24 ret = pages_trim(pages, alloc_size, leadsize, size, commit); in chunk_alloc_mmap_slow()
Dzone.c125 size_t alloc_size; in zone_free_definite_size() local
127 alloc_size = ivsalloc(tsdn_fetch(), ptr, config_prof); in zone_free_definite_size()
128 if (alloc_size != 0) { in zone_free_definite_size()
129 assert(alloc_size == size); in zone_free_definite_size()
Dpages.c108 pages_trim(void *addr, size_t alloc_size, size_t leadsize, size_t size, in pages_trim() argument
113 assert(alloc_size >= leadsize + size); in pages_trim()
118 pages_unmap(addr, alloc_size); in pages_trim()
128 size_t trailsize = alloc_size - leadsize - size; in pages_trim()
/external/libchrome/base/process/
Dmemory.cc37 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/jemalloc/test/integration/
Diterate.c8 static size_t alloc_size; variable
15 alloc_size += size; in callback()
34 alloc_size = 0; in TEST_BEGIN()
64 alloc_size = 0; in TEST_BEGIN()
96 alloc_size = 0; in TEST_BEGIN()
/external/v8/src/libplatform/tracing/
Dtrace-object.cc67 size_t alloc_size = 0; in Initialize() local
69 alloc_size += GetAllocLength(name) + GetAllocLength(scope); in Initialize()
71 alloc_size += GetAllocLength(arg_names_[i]); in Initialize()
81 if (arg_is_copy[i]) alloc_size += GetAllocLength(arg_values_[i].as_string); in Initialize()
84 if (alloc_size) { in Initialize()
88 char* ptr = parameter_copy_storage_ = new char[alloc_size]; in Initialize()
/external/tensorflow/tensorflow/core/framework/
Dallocator.cc82 const std::size_t alloc_size = port::MallocExtension_GetAllocatedSize(p); in AllocateRaw() local
85 stats_.bytes_in_use += alloc_size; in AllocateRaw()
89 std::max<int64>(stats_.max_alloc_size, alloc_size); in AllocateRaw()
96 const std::size_t alloc_size = in DeallocateRaw() local
99 stats_.bytes_in_use -= alloc_size; in DeallocateRaw()
/external/libdrm/amdgpu/
Damdgpu_bo.c98 bo->alloc_size = alloc_buffer->alloc_size; in amdgpu_bo_alloc()
101 args.in.bo_size = alloc_buffer->alloc_size; in amdgpu_bo_alloc()
183 info->alloc_size = bo_info.bo_size; in amdgpu_bo_query_info()
350 output->alloc_size = bo->alloc_size; in amdgpu_bo_import()
393 bo->alloc_size = open_arg.size; in amdgpu_bo_import()
400 bo->alloc_size = dma_buf_size; in amdgpu_bo_import()
416 output->alloc_size = bo->alloc_size; in amdgpu_bo_import()
460 ptr = drm_mmap(NULL, bo->alloc_size, PROT_READ | PROT_WRITE, MAP_SHARED, in amdgpu_bo_cpu_map()
495 r = drm_munmap(bo->cpu_ptr, bo->alloc_size) == 0 ? 0 : -errno; in amdgpu_bo_cpu_unmap()
556 bo->alloc_size = size; in amdgpu_create_bo_from_user_mem()
/external/strace/tests-mx32/
Dtail_alloc.c37 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/
Dtail_alloc.c37 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-m32/
Dtail_alloc.c37 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/libusb-compat/libusb/
Dcore.c417 size_t alloc_size = sizeof(struct usb_endpoint_descriptor) * num_endpoints; in copy_interface_descriptor() local
420 dest->endpoint = malloc(alloc_size); in copy_interface_descriptor()
423 memset(dest->endpoint, 0, alloc_size); in copy_interface_descriptor()
451 size_t alloc_size = sizeof(struct usb_interface_descriptor) in copy_interface() local
455 dest->altsetting = malloc(alloc_size); in copy_interface()
458 memset(dest->altsetting, 0, alloc_size); in copy_interface()
477 size_t alloc_size = sizeof(struct usb_interface) * num_interfaces; in copy_config_descriptor() local
480 dest->interface = malloc(alloc_size); in copy_config_descriptor()
483 memset(dest->interface, 0, alloc_size); in copy_config_descriptor()
510 size_t alloc_size; in initialize_device() local
[all …]
/external/boringssl/src/crypto/lhash/
Dlhash.c178 size_t i, alloc_size; in lh_rebucket() local
180 alloc_size = sizeof(LHASH_ITEM *) * new_num_buckets; in lh_rebucket()
181 if (alloc_size / sizeof(LHASH_ITEM*) != new_num_buckets) { in lh_rebucket()
185 new_buckets = OPENSSL_malloc(alloc_size); in lh_rebucket()
189 OPENSSL_memset(new_buckets, 0, alloc_size); in lh_rebucket()
/external/libchrome/base/trace_event/
Dtrace_event_impl.cc135 size_t alloc_size = 0; in Initialize() local
137 alloc_size += GetAllocLength(name) + GetAllocLength(scope); in Initialize()
139 alloc_size += GetAllocLength(arg_names_[i]); in Initialize()
154 alloc_size += GetAllocLength(arg_values_[i].as_string); in Initialize()
157 if (alloc_size) { in Initialize()
159 parameter_copy_storage_->resize(alloc_size); in Initialize()
161 const char* end = ptr + alloc_size; in Initialize()
/external/libvpx/libvpx/vpx/src/
Dvpx_image.c113 uint64_t alloc_size; in img_alloc_helper() local
123 alloc_size = (fmt & VPX_IMG_FMT_PLANAR) ? (uint64_t)h * s * bps / 8 in img_alloc_helper()
126 if (alloc_size != (size_t)alloc_size) goto fail; in img_alloc_helper()
128 img->img_data = (uint8_t *)vpx_memalign(buf_align, (size_t)alloc_size); in img_alloc_helper()
/external/boringssl/src/crypto/stack/
Dstack.c157 size_t alloc_size = new_alloc * sizeof(void *); in sk_insert() local
161 if (new_alloc < sk->num_alloc || alloc_size / sizeof(void *) != new_alloc) { in sk_insert()
163 alloc_size = new_alloc * sizeof(void *); in sk_insert()
167 if (new_alloc < sk->num_alloc || alloc_size / sizeof(void *) != new_alloc) { in sk_insert()
171 data = OPENSSL_realloc(sk->data, alloc_size); in sk_insert()
/external/mesa3d/src/amd/vulkan/winsys/amdgpu/
Dradv_amdgpu_bo.c84 request.alloc_size = size; in radv_amdgpu_winsys_bo_create()
189 result.alloc_size, 1 << 20, 0, &va, &va_handle, 0); in radv_amdgpu_winsys_bo_from_fd()
193 r = amdgpu_bo_va_op(result.buf_handle, 0, result.alloc_size, va, 0, AMDGPU_VA_OP_MAP); in radv_amdgpu_winsys_bo_from_fd()
206 bo->size = result.alloc_size; in radv_amdgpu_winsys_bo_from_fd()
/external/strace/
Dutil.c629 unsigned int alloc_size; in print_quoted_string() local
635 alloc_size = 4 * size; in print_quoted_string()
636 if (alloc_size / 4 != size) { in print_quoted_string()
641 alloc_size += 1 + (style & QUOTE_OMIT_LEADING_TRAILING_QUOTES ? 0 : 2) + in print_quoted_string()
644 if (use_alloca(alloc_size)) { in print_quoted_string()
645 outstr = alloca(alloc_size); in print_quoted_string()
648 outstr = buf = malloc(alloc_size); in print_quoted_string()
/external/jemalloc/include/jemalloc/
Djemalloc_macros.h70 # define JEMALLOC_ALLOC_SIZE(s) JEMALLOC_ATTR(alloc_size(s))
71 # define JEMALLOC_ALLOC_SIZE2(s1, s2) JEMALLOC_ATTR(alloc_size(s1, s2))

123