Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::ContainerSlabAllocator< T > Class Template Reference

#include <slab_allocator.hpp>

Classes

struct  rebind
 

Public Types

using value_type = T
 
using pointer = T *
 
using const_pointer = const T *
 
using size_type = std::size_t
 

Public Member Functions

pointer allocate (size_type n)
 
void deallocate (pointer p, size_type)
 

Friends

bool operator== (const ContainerSlabAllocator< T > &, const ContainerSlabAllocator< T > &)
 
bool operator!= (const ContainerSlabAllocator< T > &, const ContainerSlabAllocator< T > &)
 

Detailed Description

template<typename T>
class bb::ContainerSlabAllocator< T >

Allocator for containers such as std::vector. Makes them leverage the underlying slab allocator where possible.

Definition at line 48 of file slab_allocator.hpp.

Member Typedef Documentation

◆ const_pointer

template<typename T >
using bb::ContainerSlabAllocator< T >::const_pointer = const T*

Definition at line 52 of file slab_allocator.hpp.

◆ pointer

template<typename T >
using bb::ContainerSlabAllocator< T >::pointer = T*

Definition at line 51 of file slab_allocator.hpp.

◆ size_type

template<typename T >
using bb::ContainerSlabAllocator< T >::size_type = std::size_t

Definition at line 53 of file slab_allocator.hpp.

◆ value_type

template<typename T >
using bb::ContainerSlabAllocator< T >::value_type = T

Definition at line 50 of file slab_allocator.hpp.

Member Function Documentation

◆ allocate()

template<typename T >
pointer bb::ContainerSlabAllocator< T >::allocate ( size_type  n)
inline

Definition at line 59 of file slab_allocator.hpp.

◆ deallocate()

template<typename T >
void bb::ContainerSlabAllocator< T >::deallocate ( pointer  p,
size_type   
)
inline

Definition at line 66 of file slab_allocator.hpp.

Friends And Related Symbol Documentation

◆ operator!=

template<typename T >
bool operator!= ( const ContainerSlabAllocator< T > &  ,
const ContainerSlabAllocator< T > &   
)
friend

Definition at line 73 of file slab_allocator.hpp.

◆ operator==

template<typename T >
bool operator== ( const ContainerSlabAllocator< T > &  ,
const ContainerSlabAllocator< T > &   
)
friend

Definition at line 68 of file slab_allocator.hpp.


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