Plasma Engine  2.0
Loading...
Searching...
No Matches
AllocatorWrapper.h
1#pragma once
2
3#include <Foundation/Memory/Allocator.h>
4
6{
7 PL_FORCE_INLINE static plAllocator* GetAllocator()
8 {
9 PL_REPORT_FAILURE("This method should never be called");
10 return nullptr;
11 }
12};
13
15{
16 PL_ALWAYS_INLINE static plAllocator* GetAllocator() { return plFoundation::GetDefaultAllocator(); }
17};
18
20{
21 PL_ALWAYS_INLINE static plAllocator* GetAllocator() { return plFoundation::GetStaticsAllocator(); }
22};
23
25{
26 PL_ALWAYS_INLINE static plAllocator* GetAllocator() { return plFoundation::GetAlignedAllocator(); }
27};
28
29struct PL_FOUNDATION_DLL plLocalAllocatorWrapper
30{
32
33 void Reset();
34
35 static plAllocator* GetAllocator();
36};
Base class for all memory allocators.
Definition Allocator.h:23
static plAllocator * GetStaticsAllocator()
Returns the allocator that is used by global data and static members before the default allocator is ...
Definition Basics.cpp:56
static PL_ALWAYS_INLINE plAllocator * GetDefaultAllocator()
The default allocator can be used for any kind of allocation if no alignment is required.
Definition Basics.h:82
static PL_ALWAYS_INLINE plAllocator * GetAlignedAllocator()
The aligned allocator should be used for all allocations which need alignment.
Definition Basics.h:91
Definition AllocatorWrapper.h:25
Definition AllocatorWrapper.h:15
Definition AllocatorWrapper.h:30
Definition AllocatorWrapper.h:6
Definition AllocatorWrapper.h:20