MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Free

Method Free

Source/Engine/Core/Memory/Allocation.cpp:7–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include "Engine/Profiler/ProfilerMemory.h"
6
7void 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
25void* ArenaAllocator::Allocate(uint64 size, uint64 alignment)
26{

Callers 2

BindMethod · 0.45
MoveToEmptyFunction · 0.45

Calls 3

LockMethod · 0.80
UnlockMethod · 0.80
FreeFunction · 0.50

Tested by

no test coverage detected