Cogs.Core
MemoryContext.h
1#pragma once
2
3#include <memory>
4
5namespace Cogs::Memory
6{
7 class Allocator;
8}
9
10namespace Cogs::Core
11{
13 {
16
17 std::unique_ptr<struct MemoryContextStorage> storage;
18
19 Memory::Allocator * baseAllocator;
20 Memory::Allocator * resourceAllocator;
21 Memory::Allocator * ioAllocator;
22 Memory::Allocator * componentAllocator;
23 Memory::Allocator * scriptAllocator;
24
25 static Memory::Allocator * getStringsAllocator();
26 };
27
28 size_t getAllocatedBytes(const Memory::Allocator * allocator);
29 size_t getAllocationCount(const Memory::Allocator * allocator);
30
31 size_t getPeakBytes(const Memory::Allocator * allocator);
32 size_t getPeakCount(const Memory::Allocator * allocator);
33}
Base allocator implementation.
Definition: Allocator.h:30
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....