Plasma Engine  2.0
Loading...
Searching...
No Matches
AllocPolicyAlignedHeap.h
1#pragma once
2
3#include <Foundation/Basics.h>
4
9{
10public:
11 PL_ALWAYS_INLINE plAllocPolicyAlignedHeap(plAllocator* pParent) {}
12 PL_ALWAYS_INLINE ~plAllocPolicyAlignedHeap() = default;
13
14 void* Allocate(size_t uiSize, size_t uiAlign);
15 void Deallocate(void* pPtr);
16
17 PL_ALWAYS_INLINE plAllocator* GetParent() const { return nullptr; }
18};
19
20#if PL_ENABLED(PL_PLATFORM_WINDOWS)
21# include <Foundation/Memory/Policies/Win/AllocPolicyAlignedHeap_win.h>
22#elif PL_ENABLED(PL_PLATFORM_OSX) || PL_ENABLED(PL_PLATFORM_LINUX) || PL_ENABLED(PL_PLATFORM_ANDROID)
23# include <Foundation/Memory/Policies/Posix/AllocPolicyAlignedHeap_posix.h>
24#else
25# error "plAllocPolicyAlignedHeap is not implemented on current platform"
26#endif
Aligned Heap memory allocation policy.
Definition AllocPolicyAlignedHeap.h:9
Base class for all memory allocators.
Definition Allocator.h:23