C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
caf::detail::monotonic_buffer_resource Class Reference

Replacement for std::pmr::monotonic_buffer_resource, which sadly is not available on all platforms CAF currently supports. More...

#include <monotonic_buffer_resource.hpp>

Classes

struct  block
 A single block of memory. More...
 
struct  bucket
 A bucket for storing multiple blocks. More...
 

Public Member Functions

void release ()
 Release all allocated memory to the OS even if no destructors were called for the allocated objects.
 
void reclaim ()
 Reclaims all allocated memory (re-using it) even if no destructors were called for the allocated objects.
 
void * allocate (size_t bytes, size_t alignment=alignof(max_align_t))
 Allocates memory.
 
constexpr void deallocate (void *, size_t, size_t=alignof(max_align_t))
 Fancy no-op.
 
size_t blocks (size_t alloc_size)
 Counts how many blocks currently exist in the bucket for alloc_size.
 
size_t blocks ()
 Counts how many blocks currently exist in total.
 

Detailed Description

Replacement for std::pmr::monotonic_buffer_resource, which sadly is not available on all platforms CAF currently supports.

This resource does not support upstream resources and instead always uses malloc and free.


The documentation for this class was generated from the following files: