Lines Matching defs:bytes

41   void* do_allocate(size_t bytes, size_t align) override {
43 return std::__libcpp_allocate(bytes, align);
45 if (bytes == 0)
46 bytes = 1;
47 void* result = std::__libcpp_allocate(bytes, align);
49 std::__libcpp_deallocate(result, bytes, align);
56 void do_deallocate(void* p, size_t bytes, size_t align) override { std::__libcpp_deallocate(p, bytes, align); }
157 void* unsynchronized_pool_resource::__adhoc_pool::__do_allocate(memory_resource* upstream, size_t bytes, size_t align) {
164 size_t aligned_capacity = roundup(bytes, footer_align) + footer_size;
177 memory_resource* upstream, void* p, size_t bytes, size_t align) {
279 int unsynchronized_pool_resource::__pool_index(size_t bytes, size_t align) const {
280 if (align > alignof(std::max_align_t) || bytes > (size_t(1) << __num_fixed_pools_))
284 bytes = (bytes > align) ? bytes : align;
285 bytes -= 1;
286 bytes >>= __log2_smallest_block_size;
287 while (bytes != 0) {
288 bytes >>= 1;
342 void* unsynchronized_pool_resource::do_allocate(size_t bytes, size_t align) {
343 // A pointer to allocated storage (6.6.4.4.1) with a size of at least bytes.
346 // If the pool selected for a block of size bytes is unable to satisfy the memory request
348 // to obtain more memory. If bytes is larger than that which the largest pool can handle,
351 int i = __pool_index(bytes, align);
353 return __adhoc_pool_.__do_allocate(__res_, bytes, align);
396 void unsynchronized_pool_resource::do_deallocate(void* p, size_t bytes, size_t align) {
401 int i = __pool_index(bytes, align);
403 return __adhoc_pool_.__do_deallocate(__res_, p, bytes, align);
431 void* monotonic_buffer_resource::__initial_descriptor::__try_allocate_from_chunk(size_t bytes, size_t align) {
436 void* aligned_ptr = align_down(align, bytes, new_ptr, new_capacity);
442 void* monotonic_buffer_resource::__chunk_footer::__try_allocate_from_chunk(size_t bytes, size_t align) {
445 void* aligned_ptr = align_down(align, bytes, new_ptr, new_capacity);
451 void* monotonic_buffer_resource::do_allocate(size_t bytes, size_t align) {
464 if (void* result = __initial_.__try_allocate_from_chunk(bytes, align))
467 if (void* result = __chunks_->__try_allocate_from_chunk(bytes, align))
476 size_t aligned_capacity = roundup(bytes, footer_align) + footer_size;
493 return __chunks_->__try_allocate_from_chunk(bytes, align);