Home
last modified time | relevance | path

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

12

/external/boringssl/src/crypto/buf/
Dbuf.c93 size_t n, alloc_size; in buf_mem_grow() local
112 alloc_size = n * 4; in buf_mem_grow()
113 if (alloc_size / 4 != n) { in buf_mem_grow()
120 new_buf = OPENSSL_malloc(alloc_size); in buf_mem_grow()
123 new_buf = OPENSSL_realloc_clean(buf->data, buf->max, alloc_size); in buf_mem_grow()
125 new_buf = OPENSSL_realloc(buf->data, alloc_size); in buf_mem_grow()
134 buf->max = alloc_size; in buf_mem_grow()
172 size_t alloc_size; in BUF_strndup() local
180 alloc_size = size + 1; in BUF_strndup()
181 if (alloc_size < size) { in BUF_strndup()
[all …]
/external/fio/
Dsmalloc.c181 static int add_pool(struct pool *pool, unsigned int alloc_size) in add_pool() argument
188 alloc_size += sizeof(unsigned int); in add_pool()
190 alloc_size += sizeof(struct block_hdr); in add_pool()
191 if (alloc_size < INITIAL_SIZE) in add_pool()
192 alloc_size = INITIAL_SIZE; in add_pool()
195 alloc_size = (alloc_size + SMALLOC_BPL - 1) & ~(SMALLOC_BPL - 1); in add_pool()
196 bitmap_blocks = alloc_size / SMALLOC_BPL; in add_pool()
197 alloc_size += bitmap_blocks * sizeof(unsigned int); in add_pool()
198 pool->mmap_size = alloc_size; in add_pool()
209 ptr = mmap(NULL, alloc_size, PROT_READ|PROT_WRITE, mmap_flags, -1, 0); in add_pool()
[all …]
/external/libdrm/tests/amdgpu/
Dcs_tests.c184 req.alloc_size = 4*1024; in amdgpu_cs_uvd_create()
243 req.alloc_size = 4*1024; /* msg */ in amdgpu_cs_uvd_decode()
244 req.alloc_size += 4*1024; /* fb */ in amdgpu_cs_uvd_decode()
246 req.alloc_size += 4096; /*it_scaling_table*/ in amdgpu_cs_uvd_decode()
247 req.alloc_size += ALIGN(sizeof(uvd_bitstream), 4*1024); in amdgpu_cs_uvd_decode()
248 req.alloc_size += ALIGN(dpb_size, 4*1024); in amdgpu_cs_uvd_decode()
249 req.alloc_size += ALIGN(dt_size, 4*1024); in amdgpu_cs_uvd_decode()
258 req.alloc_size, 1, 0, &va, in amdgpu_cs_uvd_decode()
262 r = amdgpu_bo_va_op(buf_handle, 0, req.alloc_size, va, 0, in amdgpu_cs_uvd_decode()
327 r = amdgpu_bo_va_op(buf_handle, 0, req.alloc_size, va, 0, AMDGPU_VA_OP_UNMAP); in amdgpu_cs_uvd_decode()
[all …]
Dbo_tests.c71 req.alloc_size = BUFFER_SIZE; in suite_bo_tests_init()
141 CU_ASSERT_EQUAL(res.alloc_size, BUFFER_SIZE); in amdgpu_bo_export_import_do_type()
Damdgpu_test.h122 req.alloc_size = size; in gpu_mem_alloc()
173 request.alloc_size = size; in amdgpu_bo_alloc_and_map()
/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); in chunk_alloc_mmap_slow()
24 ret = pages_trim(pages, alloc_size, leadsize, size); in chunk_alloc_mmap_slow()
Dpages.c88 pages_trim(void *addr, size_t alloc_size, size_t leadsize, size_t size) in pages_trim() argument
92 assert(alloc_size >= leadsize + size); in pages_trim()
97 pages_unmap(addr, alloc_size); in pages_trim()
107 size_t trailsize = alloc_size - leadsize - size; in pages_trim()
Dzone.c124 size_t alloc_size; in zone_free_definite_size() local
126 alloc_size = ivsalloc(ptr, config_prof); in zone_free_definite_size()
127 if (alloc_size != 0) { in zone_free_definite_size()
128 assert(alloc_size == size); in zone_free_definite_size()
/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/dbus/dbus/
Ddbus-mempool.c220 int alloc_size; in _dbus_mem_pool_alloc() local
229 alloc_size = sizeof (DBusMemBlock) - ELEMENT_PADDING + in _dbus_mem_pool_alloc()
233 block = dbus_malloc0 (alloc_size); in _dbus_mem_pool_alloc()
235 block = dbus_malloc (alloc_size); in _dbus_mem_pool_alloc()
282 int alloc_size; in _dbus_mem_pool_alloc() local
295 alloc_size = sizeof (DBusMemBlock) - ELEMENT_PADDING + pool->block_size; in _dbus_mem_pool_alloc()
309 block = dbus_malloc0 (alloc_size); in _dbus_mem_pool_alloc()
311 block = dbus_malloc (alloc_size); in _dbus_mem_pool_alloc()
/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()
564 bo->alloc_size = size; in amdgpu_create_bo_from_user_mem()
Damdgpu.h139 uint64_t alloc_size; member
195 uint64_t alloc_size; member
224 uint64_t alloc_size; member
/external/pdfium/core/src/fxcrt/
Dfx_basic_memmgr.cpp59 size_t alloc_size = size > m_TrunkSize ? size : m_TrunkSize; in Alloc() local
61 sizeof(_FX_GrowOnlyTrunk) + alloc_size); in Alloc()
62 pTrunk->m_Size = alloc_size; in 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/libchrome/base/trace_event/
Dtrace_event_impl.cc127 size_t alloc_size = 0; in Initialize() local
129 alloc_size += GetAllocLength(name); in Initialize()
131 alloc_size += GetAllocLength(arg_names_[i]); in Initialize()
146 alloc_size += GetAllocLength(arg_values_[i].as_string); in Initialize()
149 if (alloc_size) { in Initialize()
151 parameter_copy_storage_->data().resize(alloc_size); in Initialize()
153 const char* end = ptr + alloc_size; in Initialize()
/external/boringssl/src/crypto/lhash/
Dlhash.c167 size_t i, alloc_size; in lh_rebucket() local
169 alloc_size = sizeof(LHASH_ITEM *) * new_num_buckets; in lh_rebucket()
170 if (alloc_size / sizeof(LHASH_ITEM*) != new_num_buckets) { in lh_rebucket()
174 new_buckets = OPENSSL_malloc(alloc_size); in lh_rebucket()
178 memset(new_buckets, 0, alloc_size); in lh_rebucket()
/external/mesa3d/src/gallium/auxiliary/util/
Du_upload_mgr.c163 unsigned alloc_size = align( size, upload->alignment ); in u_upload_alloc() local
176 if (MAX2(upload->offset, alloc_offset) + alloc_size > upload->size) { in u_upload_alloc()
178 alloc_offset + alloc_size); in u_upload_alloc()
209 upload->offset = offset + alloc_size; in u_upload_alloc()
/external/boringssl/src/crypto/stack/
Dstack.c156 size_t alloc_size = new_alloc * sizeof(void *); in sk_insert() local
160 if (new_alloc < sk->num_alloc || alloc_size / sizeof(void *) != new_alloc) { in sk_insert()
162 alloc_size = new_alloc * sizeof(void *); in sk_insert()
166 if (new_alloc < sk->num_alloc || alloc_size / sizeof(void *) != new_alloc) { in sk_insert()
170 data = OPENSSL_realloc(sk->data, alloc_size); in sk_insert()
/external/pdfium/core/src/fpdfapi/fpdf_page/
Dfpdf_page_graph_state.cpp46 int alloc_size = m_PathCount; in CPDF_ClipPathData() local
47 if (alloc_size % 8) { in CPDF_ClipPathData()
48 alloc_size += 8 - (alloc_size % 8); in CPDF_ClipPathData()
50 m_pPathList = new CPDF_Path[alloc_size]; in CPDF_ClipPathData()
54 m_pTypeList = FX_Alloc(uint8_t, alloc_size); in CPDF_ClipPathData()
79 int alloc_size = (path_count + 7) / 8 * 8; in SetCount() local
80 m_pPathList = new CPDF_Path[alloc_size]; in SetCount()
81 m_pTypeList = FX_Alloc(uint8_t, alloc_size); in SetCount()
/external/libvpx/libvpx/vpx/src/
Dvpx_image.c149 const uint64_t alloc_size = (fmt & VPX_IMG_FMT_PLANAR) ? in img_alloc_helper() local
152 if (alloc_size != (size_t)alloc_size) in img_alloc_helper()
155 img->img_data = (uint8_t *)vpx_memalign(buf_align, (size_t)alloc_size); in img_alloc_helper()
/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))
/external/libnl/lib/netfilter/
Dlog_obj.c168 void nfnl_log_set_alloc_size(struct nfnl_log *log, uint32_t alloc_size) in nfnl_log_set_alloc_size() argument
170 log->log_alloc_size = alloc_size; in nfnl_log_set_alloc_size()
262 __ADD(LOG_ATTR_ALLOC_SIZE, alloc_size)
/external/icu/icu4c/source/common/unicode/
Dplatform.h461 …GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) || __has_attribute(alloc_size)
462 # define U_ALLOC_SIZE_ATTR(X) __attribute__ ((alloc_size(X)))
463 # define U_ALLOC_SIZE_ATTR2(X,Y) __attribute__ ((alloc_size(X,Y)))
/external/strace/
Dutil.c711 unsigned int alloc_size; local
717 alloc_size = 4 * size;
718 if (alloc_size / 4 != size) {
723 alloc_size += 1 + (style & QUOTE_OMIT_LEADING_TRAILING_QUOTES ? 0 : 2);
725 if (use_alloca(alloc_size)) {
726 outstr = alloca(alloc_size);
729 outstr = buf = malloc(alloc_size);

12