Lugdunum
0.1.0
include
lug
System
Memory
Arena.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdlib>
4
#include <
lug/System/Export.hpp
>
5
#include <
lug/System/Memory/Area/IArea.hpp
>
6
7
namespace
lug
{
8
namespace
System {
9
namespace
Memory {
10
11
template
<
12
class
Allocator,
13
class
ThreadPolicy,
14
class
BoundsCheckingPolicy,
15
class
MemoryMarkingPolicy
16
>
17
class
Arena
{
18
public
:
19
Arena
() =
default
;
20
explicit
Arena
(
Area::IArea
* area);
21
22
Arena
(
const
Arena
&) =
delete
;
23
Arena
(
Arena
&&) =
default
;
24
25
Arena
&
operator=
(
const
Arena
&) =
delete
;
26
Arena
&
operator=
(
Arena
&&) =
default
;
27
28
~Arena
() =
default
;
29
30
void
*
allocate
(
size_t
size,
size_t
alignment,
size_t
offset,
const
char
* file,
size_t
line);
31
void
free
(
void
* ptr);
32
void
reset
();
33
34
Allocator&
allocator
();
35
const
Allocator&
allocator
()
const
;
36
37
private
:
38
Allocator
_allocator
;
39
ThreadPolicy
_threadGuard
;
40
BoundsCheckingPolicy
_boundsChecker
;
41
MemoryMarkingPolicy
_memoryMarker
;
42
};
43
44
#include <
lug/System/Memory/Arena.inl
>
45
46
}
// Memory
47
}
// Sytem
48
}
// lug
lug::System::Memory::Arena::operator=
Arena & operator=(const Arena &)=delete
IArea.hpp
Export.hpp
lug::System::Memory::Arena::_threadGuard
ThreadPolicy _threadGuard
Definition:
Arena.hpp:39
lug::System::Memory::Arena::~Arena
~Arena()=default
lug::System::Memory::Arena
Definition:
Arena.hpp:17
lug::System::Memory::Arena::Arena
Arena()=default
lug::System::Memory::Arena::_boundsChecker
BoundsCheckingPolicy _boundsChecker
Definition:
Arena.hpp:40
lug::System::Memory::Arena::_memoryMarker
MemoryMarkingPolicy _memoryMarker
Definition:
Arena.hpp:41
lug::System::Memory::Arena::allocator
Allocator & allocator()
Definition:
Arena.inl:83
lug
Definition:
Application.hpp:11
Arena.inl
lug::System::Memory::Arena::free
void free(void *ptr)
Definition:
Arena.inl:42
lug::System::Memory::Area::IArea
Definition:
IArea.hpp:20
lug::System::Memory::Arena::allocate
void * allocate(size_t size, size_t alignment, size_t offset, const char *file, size_t line)
Definition:
Arena.inl:15
lug::System::Memory::Arena::_allocator
Allocator _allocator
Definition:
Arena.hpp:38
lug::System::Memory::Arena::reset
void reset()
Definition:
Arena.inl:68
Generated by
1.8.13