Lines Matching refs:bytes
41 void* do_allocate(size_t bytes, size_t align) override { in do_allocate() argument
43 return std::__libcpp_allocate(bytes, align); in do_allocate()
45 if (bytes == 0) in do_allocate()
46 bytes = 1; in do_allocate()
47 void* result = std::__libcpp_allocate(bytes, align); in do_allocate()
49 std::__libcpp_deallocate(result, bytes, align); in do_allocate()
56 …void do_deallocate(void* p, size_t bytes, size_t align) override { std::__libcpp_deallocate(p, byt… in do_deallocate() argument
157 …pool_resource::__adhoc_pool::__do_allocate(memory_resource* upstream, size_t bytes, size_t align) { in __do_allocate() argument
164 size_t aligned_capacity = roundup(bytes, footer_align) + footer_size; in __do_allocate()
177 memory_resource* upstream, void* p, size_t bytes, size_t align) { in __do_deallocate() argument
278 int unsynchronized_pool_resource::__pool_index(size_t bytes, size_t align) const { in __pool_index() argument
279 if (align > alignof(std::max_align_t) || bytes > (size_t(1) << __num_fixed_pools_)) in __pool_index()
283 bytes = (bytes > align) ? bytes : align; in __pool_index()
284 bytes -= 1; in __pool_index()
285 bytes >>= __log2_smallest_block_size; in __pool_index()
286 while (bytes != 0) { in __pool_index()
287 bytes >>= 1; in __pool_index()
341 void* unsynchronized_pool_resource::do_allocate(size_t bytes, size_t align) { in do_allocate() argument
350 int i = __pool_index(bytes, align); in do_allocate()
352 return __adhoc_pool_.__do_allocate(__res_, bytes, align); in do_allocate()
395 void unsynchronized_pool_resource::do_deallocate(void* p, size_t bytes, size_t align) { in do_deallocate() argument
400 int i = __pool_index(bytes, align); in do_deallocate()
402 return __adhoc_pool_.__do_deallocate(__res_, p, bytes, align); in do_deallocate()
429 void* monotonic_buffer_resource::__initial_descriptor::__try_allocate_from_chunk(size_t bytes, size… in __try_allocate_from_chunk() argument
434 void* aligned_ptr = align_down(align, bytes, new_ptr, new_capacity); in __try_allocate_from_chunk()
440 void* monotonic_buffer_resource::__chunk_footer::__try_allocate_from_chunk(size_t bytes, size_t ali… in __try_allocate_from_chunk() argument
443 void* aligned_ptr = align_down(align, bytes, new_ptr, new_capacity); in __try_allocate_from_chunk()
449 void* monotonic_buffer_resource::do_allocate(size_t bytes, size_t align) { in do_allocate() argument
462 if (void* result = __initial_.__try_allocate_from_chunk(bytes, align)) in do_allocate()
465 if (void* result = __chunks_->__try_allocate_from_chunk(bytes, align)) in do_allocate()
474 size_t aligned_capacity = roundup(bytes, footer_align) + footer_size; in do_allocate()
491 return __chunks_->__try_allocate_from_chunk(bytes, align); in do_allocate()