Home
last modified time | relevance | path

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

123

/external/chromium_org/content/browser/loader/
Dresource_buffer.cc94 int alloc_size; in Allocate() local
100 alloc_size = buf_size_; in Allocate()
111 alloc_size = buf_size_ - alloc_end_; in Allocate()
116 alloc_size = alloc_start_; in Allocate()
123 alloc_size = alloc_start_ - alloc_end_; in Allocate()
131 alloc_sizes_.push(alloc_size); in Allocate()
133 if (alloc_size > max_alloc_size_) { in Allocate()
134 alloc_size = max_alloc_size_; in Allocate()
135 ShrinkLastAllocation(alloc_size); in Allocate()
138 *size = alloc_size; in Allocate()
/external/chromium_org/third_party/boringssl/src/crypto/buf/
Dbuf.c91 size_t n, alloc_size; in buf_mem_grow() local
110 alloc_size = n * 4; in buf_mem_grow()
111 if (alloc_size / 4 != n) { in buf_mem_grow()
118 new_buf = OPENSSL_malloc(alloc_size); in buf_mem_grow()
121 new_buf = OPENSSL_realloc_clean(buf->data, buf->max, alloc_size); in buf_mem_grow()
123 new_buf = OPENSSL_realloc(buf->data, alloc_size); in buf_mem_grow()
132 buf->max = alloc_size; in buf_mem_grow()
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()
[all …]
/external/fio/
Dsmalloc.c180 static int add_pool(struct pool *pool, unsigned int alloc_size) in add_pool() argument
186 alloc_size += sizeof(unsigned int); in add_pool()
188 alloc_size += sizeof(struct block_hdr); in add_pool()
189 if (alloc_size < INITIAL_SIZE) in add_pool()
190 alloc_size = INITIAL_SIZE; in add_pool()
193 alloc_size = (alloc_size + SMALLOC_BPL - 1) & ~(SMALLOC_BPL - 1); in add_pool()
194 bitmap_blocks = alloc_size / SMALLOC_BPL; in add_pool()
195 alloc_size += bitmap_blocks * sizeof(unsigned int); in add_pool()
196 pool->mmap_size = alloc_size; in add_pool()
201 ptr = mmap(NULL, alloc_size, PROT_READ|PROT_WRITE, in add_pool()
[all …]
/external/jemalloc/src/
Dchunk_mmap.c106 pages_trim(void *addr, size_t alloc_size, size_t leadsize, size_t size) in pages_trim() argument
110 assert(alloc_size >= leadsize + size); in pages_trim()
115 pages_unmap(addr, alloc_size); in pages_trim()
125 size_t trailsize = alloc_size - leadsize - size; in pages_trim()
169 size_t alloc_size, leadsize; in chunk_alloc_mmap_slow() local
171 alloc_size = size + alignment - PAGE; in chunk_alloc_mmap_slow()
173 if (alloc_size < size) in chunk_alloc_mmap_slow()
176 pages = pages_map(NULL, alloc_size); in chunk_alloc_mmap_slow()
181 ret = pages_trim(pages, alloc_size, leadsize, size); in chunk_alloc_mmap_slow()
/external/chromium_org/base/process/
Dmemory.cc13 const size_t alloc_size = num_items * size; in UncheckedCalloc() local
16 if (size && ((alloc_size / size) != num_items)) { in UncheckedCalloc()
21 if (!UncheckedMalloc(alloc_size, result)) in UncheckedCalloc()
24 memset(*result, 0, alloc_size); in UncheckedCalloc()
/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/chromium_org/third_party/tcmalloc/chromium/src/
Dheap-profile-stats.h32 alloc_size - free_size == other.alloc_size - other.free_size; in Equivalent()
37 int64 alloc_size; // Total size of all allocated objects so far. member
Dheap-profile-table.cc125 return (a->alloc_size - a->free_size) > (b->alloc_size - b->free_size); in ByAllocatedSpace()
220 b->alloc_size += bytes; in RecordAlloc()
222 total_.alloc_size += bytes; in RecordAlloc()
308 profile_stats->alloc_size += b.alloc_size; in UnparseBucket()
316 b.alloc_size - b.free_size, in UnparseBucket()
318 b.alloc_size, in UnparseBucket()
502 b.alloc_size = v->bytes; in DumpNonLiveIterator()
518 b.alloc_size = v->bytes; in DumpMarkedIterator()
629 int(total_.alloc_size - total_.free_size)); in NonLiveSnapshot()
638 int(s->total_.alloc_size - s->total_.free_size)); in NonLiveSnapshot()
[all …]
/external/chromium_org/third_party/tcmalloc/vendor/src/
Dheap-profile-table.cc120 return (a->alloc_size - a->free_size) > (b->alloc_size - b->free_size); in ByAllocatedSpace()
230 b->alloc_size += bytes; in RecordAlloc()
232 total_.alloc_size += bytes; in RecordAlloc()
301 profile_stats->alloc_size += b.alloc_size; in UnparseBucket()
308 b.alloc_size - b.free_size, in UnparseBucket()
310 b.alloc_size, in UnparseBucket()
377 if (b->alloc_size == 0) { in RefreshMMapData()
381 b->alloc_size += r->end_addr - r->start_addr; in RefreshMMapData()
437 total_with_mmap.alloc_size += MemoryRegionMap::MapSize(); in FillOrderedProfile()
469 b.alloc_size = v->bytes; in DumpNonLiveIterator()
[all …]
Dheap-profile-table.h64 int64 alloc_size; // Total size of all allocated objects so far member
70 alloc_size - free_size == x.alloc_size - x.free_size; in Equivalent()
388 return (total_.allocs == 0) && (total_.alloc_size == 0); in Empty()
410 total_.alloc_size += v.bytes; in Add()
Dheap-profiler.cc264 const int64 inuse_bytes = total.alloc_size - total.free_size; in MaybeDumpProfileLocked()
268 total.alloc_size >= in MaybeDumpProfileLocked()
272 total.alloc_size >> 20, inuse_bytes >> 20); in MaybeDumpProfileLocked()
291 last_dump_alloc = total.alloc_size; in MaybeDumpProfileLocked()
/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/oprofile/libutil/
Dop_libiberty.c30 void * xmemdup (void const * input, size_t copy_size, size_t alloc_size) in xmemdup() argument
32 void * output = xcalloc(1, alloc_size); in xmemdup()
/external/chromium_org/third_party/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/chromium_org/third_party/boringssl/src/crypto/lhash/
Dlhash.c165 size_t i, alloc_size; in lh_rebucket() local
167 alloc_size = sizeof(LHASH_ITEM *) * new_num_buckets; in lh_rebucket()
168 if (alloc_size / sizeof(LHASH_ITEM*) != new_num_buckets) { in lh_rebucket()
172 new_buckets = OPENSSL_malloc(alloc_size); in lh_rebucket()
176 memset(new_buckets, 0, alloc_size); in lh_rebucket()
/external/chromium_org/third_party/mesa/src/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/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/chromium_org/chrome/installer/mini_installer/
Dmini_string.cc43 size_t SafeStrLen(const wchar_t* str, size_t alloc_size) { in SafeStrLen() argument
44 if (!str || !alloc_size) in SafeStrLen()
47 while (--alloc_size && str[len] != L'\0') in SafeStrLen()
/external/chromium_org/chrome/common/
Dservice_process_util.cc261 uint32 alloc_size = sizeof(ServiceProcessSharedData); in CreateSharedData() local
264 (GetServiceProcessSharedMemName(), true, alloc_size)) in CreateSharedData()
267 if (!shared_mem_service_data->Map(alloc_size)) in CreateSharedData()
270 memset(shared_mem_service_data->memory(), 0, alloc_size); in CreateSharedData()
/external/chromium_org/third_party/libvpx/source/libvpx/vpx/src/
Dvpx_image.c143 const uint64_t alloc_size = (fmt & VPX_IMG_FMT_PLANAR) ? in img_alloc_helper() local
146 if (alloc_size != (size_t)alloc_size) in img_alloc_helper()
149 img->img_data = (uint8_t *)vpx_memalign(buf_align, (size_t)alloc_size); in img_alloc_helper()
/external/chromium_org/chromecast/media/cma/ipc/
Dmedia_message_unittest.cc35 void* data, size_t size, size_t alloc_size) { in DummyAllocator() argument
36 CHECK_LE(alloc_size, size); in DummyAllocator()
38 new ExternalMemoryBlock(data, alloc_size)); in DummyAllocator()
/external/pdfium/core/src/fpdfapi/fpdf_page/
Dfpdf_page_graph_state.cpp57 int alloc_size = m_PathCount; in CPDF_ClipPathData() local
58 if (alloc_size % 8) { in CPDF_ClipPathData()
59 alloc_size += 8 - (alloc_size % 8); in CPDF_ClipPathData()
61 FX_NEW_VECTOR(m_pPathList, CPDF_Path, alloc_size); in CPDF_ClipPathData()
65 m_pTypeList = FX_Alloc(FX_BYTE, alloc_size); in CPDF_ClipPathData()
92 int alloc_size = (path_count + 7) / 8 * 8; in SetCount() local
93 FX_NEW_VECTOR(m_pPathList, CPDF_Path, alloc_size); in SetCount()
94 m_pTypeList = FX_Alloc(FX_BYTE, alloc_size); in SetCount()
/external/icu/icu4c/source/common/unicode/
Dplatform.h445 …GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) || __has_attribute(alloc_size)
446 # define U_ALLOC_SIZE_ATTR(X) __attribute__ ((alloc_size(X)))
447 # define U_ALLOC_SIZE_ATTR2(X,Y) __attribute__ ((alloc_size(X,Y)))
/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/chromium_org/third_party/icu/source/common/unicode/
Dplatform.h447 …GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) || __has_attribute(alloc_size)
448 # define U_ALLOC_SIZE_ATTR(X) __attribute__ ((alloc_size(X)))
449 # define U_ALLOC_SIZE_ATTR2(X,Y) __attribute__ ((alloc_size(X,Y)))

123