Lines Matching defs:bytes

42   void* do_allocate(size_t bytes, size_t align) override {
44 return std::__libcpp_allocate<std::byte>(__element_count(bytes), align);
46 if (bytes == 0)
47 bytes = 1;
48 std::byte* result = std::__libcpp_allocate<std::byte>(__element_count(bytes), align);
50 std::__libcpp_deallocate<std::byte>(result, __element_count(bytes), align);
57 void do_deallocate(void* p, size_t bytes, size_t align) override {
58 std::__libcpp_deallocate<std::byte>(static_cast<std::byte*>(p), __element_count(bytes), align);
160 void* unsynchronized_pool_resource::__adhoc_pool::__do_allocate(memory_resource* upstream, size_t bytes, size_t align) {
167 size_t aligned_capacity = roundup(bytes, footer_align) + footer_size;
180 memory_resource* upstream, void* p, size_t bytes, size_t align) {
282 int unsynchronized_pool_resource::__pool_index(size_t bytes, size_t align) const {
283 if (align > alignof(std::max_align_t) || bytes > (size_t(1) << __num_fixed_pools_))
287 bytes = (bytes > align) ? bytes : align;
288 bytes -= 1;
289 bytes >>= __log2_smallest_block_size;
290 while (bytes != 0) {
291 bytes >>= 1;
345 void* unsynchronized_pool_resource::do_allocate(size_t bytes, size_t align) {
346 // A pointer to allocated storage (6.6.4.4.1) with a size of at least bytes.
349 // If the pool selected for a block of size bytes is unable to satisfy the memory request
351 // to obtain more memory. If bytes is larger than that which the largest pool can handle,
354 int i = __pool_index(bytes, align);
356 return __adhoc_pool_.__do_allocate(__res_, bytes, align);
399 void unsynchronized_pool_resource::do_deallocate(void* p, size_t bytes, size_t align) {
404 int i = __pool_index(bytes, align);
406 return __adhoc_pool_.__do_deallocate(__res_, p, bytes, align);
437 void* __try_allocate_from_chunk(Chunk& self, size_t bytes, size_t align) {
447 void* aligned_ptr = align_down(align, bytes, new_ptr, new_capacity);
453 void* monotonic_buffer_resource::do_allocate(size_t bytes, size_t align) {
466 if (void* result = __try_allocate_from_chunk<true, __initial_descriptor>(__initial_, bytes, align))
469 if (void* result = __try_allocate_from_chunk<false, __chunk_footer>(*__chunks_, bytes, align))
478 size_t aligned_capacity = roundup(bytes, footer_align) + footer_size;
495 return __try_allocate_from_chunk<false, __chunk_footer>(*__chunks_, bytes, align);