SPH
|
Allocator that attemps to allocate using given primary allocator, and if the allocation fails, it allocates using a second fallback allocator. More...
#include <Allocators.h>
Public Member Functions | |
INLINE MemoryBlock | allocate (const std::size_t size, const std::size_t align) noexcept |
INLINE void | deallocate (MemoryBlock &block) noexcept |
INLINE const TPrimary & | primary () const |
INLINE const TFallback & | fallback () const |
Allocator that attemps to allocate using given primary allocator, and if the allocation fails, it allocates using a second fallback allocator.
Note that this is just a simple compositor and it doesn't guarantee that the fallback allocation succeeds. To ensure the allocation is successful, consider nesting multiple fallback allocators together and provide an allocator that cannot fail as the last one.
Definition at line 101 of file Allocators.h.
|
inlinenoexcept |
Definition at line 103 of file Allocators.h.
|
inlinenoexcept |
Definition at line 112 of file Allocators.h.
|
inline |
Definition at line 124 of file Allocators.h.
|
inline |
Definition at line 120 of file Allocators.h.