16#elif ( __OSX__ || __APPLE__ || __linux__ )
19#error "UNKNOWN PLATFORM"
25template<
typename TYPE>
30 if constexpr (!std::is_trivially_constructible<TYPE>::value)
32 for (
size_t i = 0; i < size; ++i)
34 ::new( &buffer[i] ) TYPE;
43template<
typename TYPE>
47 TYPE* buffer = (TYPE*)
StackAlloc(size *
sizeof(TYPE));
48 if constexpr (!std::is_trivially_constructible<TYPE>::value)
50 for (
size_t i = 0; i < size; ++i)
52 ::new(&buffer[i]) TYPE;
61template<
typename TYPE>
65 if constexpr (!std::is_trivially_destructible<TYPE>::value)
67 for (
size_t i = 0; i < size; ++i)
78template<
typename TYPE>
82 if constexpr (!std::is_trivially_destructible<TYPE>::value)
84 for (
size_t i = 0; i < size; ++i)
Nebula compiler specific defines and configuration.
void ArrayFreeStack(size_t size, TYPE *buffer)
Definition memory.h:80
TYPE * ArrayAllocStack(size_t size)
Definition memory.h:45
void ArrayFree(size_t size, TYPE *buffer)
Definition memory.h:63
TYPE * ArrayAlloc(size_t size)
Definition memory.h:27
void * Alloc(HeapType heapType, size_t size, size_t alignment)
Allocate a block of memory from one of the global heaps.
Definition osxmemory.cc:56
void Free(HeapType heapType, void *ptr)
Free a block of memory.
Definition osxmemory.cc:136
@ ObjectArrayHeap
Definition osxmemoryconfig.h:28
Memory subsystem features for the Posix platform.
#define StackFree(ptr)
Definition posixmemory.h:31
#define StackAlloc(size)
Definition posixmemory.h:30
Memory subsystem features for win32.