SPH
Public Member Functions | List of all members
MemoryResourceAllocator< TResource > Class Template Reference

Allocator that obtains memory blocks from given memory resource. More...

#include <Allocators.h>

Public Member Functions

INLINE void bind (TResource &other)
 
INLINE MemoryBlock allocate (const std::size_t size, const Size align) noexcept
 
INLINE void deallocate (MemoryBlock &UNUSED(block)) noexcept
 
INLINE bool owns (const MemoryBlock &block) const noexcept
 

Detailed Description

template<typename TResource>
class MemoryResourceAllocator< TResource >

Allocator that obtains memory blocks from given memory resource.

Allocator does not own the resource, therefore the resource must exist as long as any object that uses the allocator. Allocator cannot deallocate memory.

Definition at line 207 of file Allocators.h.

Member Function Documentation

◆ allocate()

template<typename TResource >
INLINE MemoryBlock MemoryResourceAllocator< TResource >::allocate ( const std::size_t  size,
const Size  align 
)
inlinenoexcept

Definition at line 216 of file Allocators.h.

◆ bind()

template<typename TResource >
INLINE void MemoryResourceAllocator< TResource >::bind ( TResource &  other)
inline

Definition at line 212 of file Allocators.h.

◆ deallocate()

template<typename TResource >
INLINE void MemoryResourceAllocator< TResource >::deallocate ( MemoryBlock UNUSEDblock)
inlinenoexcept

Definition at line 224 of file Allocators.h.

◆ owns()

template<typename TResource >
INLINE bool MemoryResourceAllocator< TResource >::owns ( const MemoryBlock block) const
inlinenoexcept

Definition at line 226 of file Allocators.h.


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