| 5 | #include "Engine/Profiler/ProfilerMemory.h" |
| 6 | |
| 7 | void ArenaAllocator::Free() |
| 8 | { |
| 9 | // Free all pages |
| 10 | Page* page = _first; |
| 11 | while (page) |
| 12 | { |
| 13 | #if COMPILE_WITH_PROFILER |
| 14 | ProfilerMemory::OnGroupUpdate(ProfilerMemory::Groups::MallocArena, -(int64)page->Size, -1); |
| 15 | #endif |
| 16 | Page* next = page->Next; |
| 17 | Allocator::Free(page); |
| 18 | page = next; |
| 19 | } |
| 20 | |
| 21 | // Unlink |
| 22 | _first = nullptr; |
| 23 | } |
| 24 | |
| 25 | void* ArenaAllocator::Allocate(uint64 size, uint64 alignment) |
| 26 | { |
no test coverage detected