18operator"" _KB(
const unsigned long long val)
27operator"" _MB(
const unsigned long long val)
29 return val * 1024 * 1024;
36operator"" _GB(
const unsigned long long val)
38 return val * 1024 * 1024 * 1024;
43#elif ( __OSX__ || __APPLE__ || __linux__ )
46#error "UNKNOWN PLATFORM"
55template<
typename TYPE>
60 if constexpr (!std::is_trivially_constructible<TYPE>::value)
62 for (
size_t i = 0; i < size; ++i)
64 ::new( &buffer[i] ) TYPE;
73template<
typename TYPE>
79 if constexpr (!std::is_trivially_constructible<TYPE>::value)
81 for (
size_t i = 0; i < size; ++i)
83 ::new(&buffer[i]) TYPE;
92template<
typename TYPE>
96 if constexpr (!std::is_trivially_destructible<TYPE>::value)
98 for (
size_t i = 0; i < size; ++i)
109template<
typename TYPE>
115 if constexpr (!std::is_trivially_destructible<TYPE>::value)
117 for (
size_t i = 0; i < size; ++i)
#define n_assert(exp)
Definition debug.h:50
Nebula compiler specific defines and configuration.
thread_local size_t ThreadLocalMiniHeapIterator
Definition memory.cc:7
void ArrayFreeStack(size_t size, TYPE *buffer)
Definition memory.h:111
TYPE * ArrayAllocStack(size_t size)
Definition memory.h:75
void ArrayFree(size_t size, TYPE *buffer)
Definition memory.h:94
TYPE * ArrayAlloc(size_t size)
Definition memory.h:57
thread_local char ThreadLocalMiniHeap[]
Definition memory.cc:6
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.
Memory subsystem features for win32.