Plasma Engine  2.0
Loading...
Searching...
No Matches
AllocPolicyAlignedHeap_win.h
1
2PL_FORCE_INLINE void* plAllocPolicyAlignedHeap::Allocate(size_t uiSize, size_t uiAlign)
3{
4 uiAlign = plMath::Max<size_t>(uiAlign, 16u);
5
6 void* ptr = _aligned_malloc(uiSize, uiAlign);
7 PL_CHECK_ALIGNMENT(ptr, uiAlign);
8
9 return ptr;
10}
11
12PL_ALWAYS_INLINE void plAllocPolicyAlignedHeap::Deallocate(void* pPtr)
13{
14 _aligned_free(pPtr);
15}
constexpr PL_ALWAYS_INLINE T Max(T f1, T f2)
Returns the greater value, f1 or f2.
Definition Math_inl.h:39