Divide Framework
0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
StackAllocator.h
Go to the documentation of this file.
1
/*
2
Author : Tobias Stein
3
Date : 22nd October, 2016
4
File : StackAllocator.h
5
6
Stack allocator.
7
8
All Rights Reserved. (c) Copyright 2016.
9
*/
10
11
#pragma once
12
#ifndef ECS__STACK_ALLOC_H__
13
#define ECS__STACK_ALLOC_H__
14
15
#include "
Memory/Allocator/IAllocator.h
"
16
17
namespace
ECS
{
namespace
Memory {
namespace
Allocator {
18
19
/*
20
*/
21
class
ECS_API
StackAllocator
:
public
IAllocator
22
{
23
private
:
24
25
struct
AllocMetaInfo
26
{
27
u8
adjustment
;
28
};
29
30
public
:
31
32
StackAllocator
(
size_t
memSize,
const
void
* mem);
33
34
virtual
~StackAllocator
()
override
;
35
36
virtual
void
* allocate(
size_t
size,
u8
alignment)
override
;
37
virtual
void
free(
void
* p)
override
;
38
virtual
void
clear()
override
;
39
40
};
// class StackAllocator
41
42
} } }
// namespace ECS::Memory::Allocator
43
44
#endif
// ECS__STACK_ALLOC_H__
IAllocator.h
ECS_API
#define ECS_API
Definition:
Platform.h:16
ECS::Memory::Allocator::IAllocator
Definition:
IAllocator.h:56
ECS::Memory::Allocator::StackAllocator
Definition:
StackAllocator.h:22
ECS
Definition:
SGNComponent.h:51
ECS::u8
uint8_t u8
Definition:
Platform.h:49
ECS::Memory::Allocator::StackAllocator::AllocMetaInfo
Definition:
StackAllocator.h:26
ECS::Memory::Allocator::StackAllocator::AllocMetaInfo::adjustment
u8 adjustment
Definition:
StackAllocator.h:27
Source
ThirdParty
EntityComponentSystem
include
ECS
Memory
Allocator
StackAllocator.h
Generated on Fri May 17 2024 16:59:57 for Divide Framework by
1.9.6