Alloc memory from system.
108 {
109#ifdef _WIN32
110
114 void* ptr = VirtualAlloc(0, kpage << MemoryPool::PAGE_SHIFT, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
115#else
116
117#endif
118
119 if (ptr == nullptr)
120 {
121 SPICES_CORE_ERROR("Memory alloc failed.")
122 }
123
125
126 return ptr;
127 }
#define SPICES_PROFILE_ALLOC_N(ptr, size, name)