Home
last modified time | relevance | path

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

1234

/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/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/libdrm/tests/amdgpu/
Dcs_tests.c211 req.alloc_size = 4*1024; in amdgpu_cs_uvd_create()
282 req.alloc_size = 4*1024; /* msg */ in amdgpu_cs_uvd_decode()
283 req.alloc_size += 4*1024; /* fb */ in amdgpu_cs_uvd_decode()
285 req.alloc_size += 4096; /*it_scaling_table*/ in amdgpu_cs_uvd_decode()
286 req.alloc_size += ALIGN(sizeof(uvd_bitstream), 4*1024); in amdgpu_cs_uvd_decode()
287 req.alloc_size += ALIGN(dpb_size, 4*1024); in amdgpu_cs_uvd_decode()
288 req.alloc_size += ALIGN(dt_size, 4*1024); in amdgpu_cs_uvd_decode()
297 req.alloc_size, 1, 0, &va, in amdgpu_cs_uvd_decode()
301 r = amdgpu_bo_va_op(buf_handle, 0, req.alloc_size, va, 0, in amdgpu_cs_uvd_decode()
402 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/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/tensorflow/tensorflow/core/common_runtime/gpu/
Dpool_allocator_test.cc130 int64 alloc_size = 0; in TEST() local
132 [&alloc_count, &alloc_size](void* ptr, int numa_node, int64 size) { in TEST()
134 alloc_size += size; in TEST()
152 EXPECT_EQ(0, alloc_size); in TEST()
165 EXPECT_EQ(16 + (alloc_count * kChunkPrefixSize), alloc_size); in TEST()
177 EXPECT_EQ(16 + (alloc_count * kChunkPrefixSize), alloc_size); in TEST()
192 EXPECT_EQ(16 + 4 + 2 + (alloc_count * kChunkPrefixSize), alloc_size); in TEST()
202 EXPECT_EQ(16 + 4 + 2 + (alloc_count * kChunkPrefixSize), alloc_size); in TEST()
219 EXPECT_EQ(16 + 4 + 2 + (alloc_count * kChunkPrefixSize), alloc_size); in TEST()
229 EXPECT_EQ(16 + 4 + 2 + (alloc_count * kChunkPrefixSize), alloc_size); 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()
/external/jemalloc_new/test/unit/
Dpages.c4 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/
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/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/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/linux-kselftest/tools/testing/selftests/powerpc/stringloops/
Dmemcmp.c76 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/mesa3d/src/intel/vulkan/
Danv_allocator.c700 state.alloc_size = anv_state_pool_get_bucket_size(bucket); in anv_state_pool_alloc_no_vg()
743 state.alloc_size < pool->block_size) { in anv_state_pool_alloc_no_vg()
760 assert(chunk_size % state.alloc_size == 0); in anv_state_pool_alloc_no_vg()
763 chunk_offset + state.alloc_size, in anv_state_pool_alloc_no_vg()
764 state.alloc_size, in anv_state_pool_alloc_no_vg()
765 (chunk_size / state.alloc_size) - 1); in anv_state_pool_alloc_no_vg()
774 state.alloc_size, in anv_state_pool_alloc_no_vg()
797 state.alloc_size = pool->block_size; in anv_state_pool_alloc_back()
810 VG(VALGRIND_MEMPOOL_ALLOC(pool, state.map, state.alloc_size)); in anv_state_pool_alloc_back()
817 assert(util_is_power_of_two(state.alloc_size)); in anv_state_pool_free_no_vg()
[all …]
/external/libdrm/amdgpu/
Damdgpu_bo.c71 bo->alloc_size = alloc_buffer->alloc_size; in amdgpu_bo_alloc()
74 args.in.bo_size = alloc_buffer->alloc_size; in amdgpu_bo_alloc()
156 info->alloc_size = bo_info.bo_size; in amdgpu_bo_query_info()
324 output->alloc_size = bo->alloc_size; in amdgpu_bo_import()
367 bo->alloc_size = open_arg.size; in amdgpu_bo_import()
374 bo->alloc_size = dma_buf_size; in amdgpu_bo_import()
390 output->alloc_size = bo->alloc_size; in amdgpu_bo_import()
461 ptr = drm_mmap(NULL, bo->alloc_size, PROT_READ | PROT_WRITE, MAP_SHARED, in amdgpu_bo_cpu_map()
496 r = drm_munmap(bo->cpu_ptr, bo->alloc_size) == 0 ? 0 : -errno; in amdgpu_bo_cpu_unmap()
557 bo->alloc_size = size; in amdgpu_create_bo_from_user_mem()
/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/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/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/perfetto/src/profiling/memory/
Dclient.h68 bool RecordMalloc(uint64_t alloc_size,
81 size_t GetSampleSizeLocked(size_t alloc_size) { in GetSampleSizeLocked() argument
82 return sampler_.SampleSize(alloc_size); in GetSampleSizeLocked()
/external/tensorflow/tensorflow/core/framework/
Dallocator.cc123 const std::size_t alloc_size = port::MallocExtension_GetAllocatedSize(p); in AllocateRaw() local
126 stats_.bytes_in_use += alloc_size; in AllocateRaw()
130 std::max<int64>(stats_.largest_alloc_size, alloc_size); in AllocateRaw()
145 const std::size_t alloc_size = in DeallocateRaw() local
148 stats_.bytes_in_use -= alloc_size; in DeallocateRaw()
/external/jemalloc_new/src/
Dpages.c113 os_pages_trim(void *addr, size_t alloc_size, size_t leadsize, size_t size, in os_pages_trim() argument
117 assert(alloc_size >= leadsize + size); in os_pages_trim()
119 os_pages_unmap(addr, alloc_size); in os_pages_trim()
129 size_t trailsize = alloc_size - leadsize - size; in os_pages_trim()
170 size_t alloc_size = size + alignment - os_page; in pages_map_slow() local
172 if (alloc_size < size) { in pages_map_slow()
178 void *pages = os_pages_map(NULL, alloc_size, alignment, commit); in pages_map_slow()
184 ret = os_pages_trim(pages, alloc_size, leadsize, size, commit); in pages_map_slow()
/external/tensorflow/tensorflow/core/common_runtime/
Dmkl_cpu_allocator.h79 const size_t alloc_size = port::MallocExtension_GetAllocatedSize(ptr); in DeallocateRaw() local
80 DecrementStats(alloc_size); in DeallocateRaw()
101 inline void IncrementStats(size_t alloc_size) LOCKS_EXCLUDED(mutex_) { in IncrementStats() argument
104 stats_.bytes_in_use += alloc_size; in IncrementStats()
108 std::max(alloc_size, static_cast<size_t>(stats_.largest_alloc_size)); in IncrementStats()
/external/libvpx/libvpx/vpx/src/
Dvpx_image.c94 uint64_t alloc_size; in img_alloc_helper() local
104 alloc_size = (fmt & VPX_IMG_FMT_PLANAR) ? (uint64_t)h * s * bps / 8 in img_alloc_helper()
107 if (alloc_size != (size_t)alloc_size) goto fail; in img_alloc_helper()
109 img->img_data = (uint8_t *)vpx_memalign(buf_align, (size_t)alloc_size); in img_alloc_helper()
/external/boringssl/src/crypto/lhash/
Dlhash.c197 size_t i, alloc_size; in lh_rebucket() local
199 alloc_size = sizeof(LHASH_ITEM *) * new_num_buckets; in lh_rebucket()
200 if (alloc_size / sizeof(LHASH_ITEM*) != new_num_buckets) { in lh_rebucket()
204 new_buckets = OPENSSL_malloc(alloc_size); in lh_rebucket()
208 OPENSSL_memset(new_buckets, 0, alloc_size); in lh_rebucket()
/external/libaom/libaom/aom/src/
Daom_image.c114 const uint64_t alloc_size = in img_alloc_helper() local
119 if (alloc_size != (size_t)alloc_size) goto fail; in img_alloc_helper()
121 img->img_data = (uint8_t *)aom_memalign(buf_align, (size_t)alloc_size); in img_alloc_helper()
123 img->sz = (size_t)alloc_size; in img_alloc_helper()

1234