Add engine fatal error types handling
Add general out-of-memory handling Add safety memory buffer for crash or out of memory handling Refactor Globals exit/error state to be in Engine class
This commit is contained in:
@@ -30,6 +30,8 @@ void* UnixPlatform::Allocate(uint64 size, uint64 alignment)
|
||||
// Calculate the offset and store it behind aligned pointer
|
||||
*((offset_t*)ptr - 1) = (offset_t)((uintptr_t)ptr - (uintptr_t)p);
|
||||
}
|
||||
else
|
||||
OutOfMemory();
|
||||
#if COMPILE_WITH_PROFILER
|
||||
OnMemoryAlloc(ptr, size);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user