libcopp
2.3.1
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
Functions
_
a
c
d
f
g
h
i
m
o
p
r
s
t
w
y
Variables
_
a
b
c
d
e
f
g
h
l
m
o
p
r
s
t
u
w
x
Typedefs
Enumerations
Enumerator
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Typedefs
_
a
b
c
d
e
f
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerations
Enumerator
e
l
s
u
Related Symbols
_
d
e
i
l
o
r
s
w
Files
File List
Globals
All
_
b
c
e
g
j
l
m
o
p
r
s
t
u
w
Functions
b
c
g
j
m
o
p
r
s
t
Variables
b
c
g
m
s
t
Typedefs
Enumerations
Enumerator
c
e
Macros
_
c
l
m
s
t
u
w
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
include
libcopp
stack
allocator
stack_allocator_memory.h
Go to the documentation of this file.
1
// Copyright 2023 owent
2
3
#pragma once
4
5
#include <libcopp/utils/config/libcopp_build_features.h>
6
7
#include <
libcopp/utils/features.h
>
8
9
#include <cstddef>
10
11
#ifdef LIBCOPP_HAS_ABI_HEADERS
12
# include LIBCOPP_ABI_PREFIX
13
#endif
14
15
LIBCOPP_COPP_NAMESPACE_BEGIN
16
struct
stack_context
;
17
18
namespace
allocator
{
19
24
class
LIBCOPP_COPP_API
stack_allocator_memory
{
25
private
:
26
void
*
start_ptr_
;
27
std::size_t
memory_size_
;
28
bool
is_used_
;
29
30
public
:
31
stack_allocator_memory
() LIBCOPP_MACRO_NOEXCEPT;
37
stack_allocator_memory
(
void
*start_ptr,
std
::
size_t
max_size) LIBCOPP_MACRO_NOEXCEPT;
38
stack_allocator_memory
(
stack_allocator_memory
&other) LIBCOPP_MACRO_NOEXCEPT;
39
stack_allocator_memory
(
stack_allocator_memory
&&other) LIBCOPP_MACRO_NOEXCEPT;
40
~
stack_allocator_memory
();
41
42
stack_allocator_memory
&operator=(
stack_allocator_memory
&other) LIBCOPP_MACRO_NOEXCEPT;
43
stack_allocator_memory
&operator=(
stack_allocator_memory
&&other) LIBCOPP_MACRO_NOEXCEPT;
44
void
swap(
stack_allocator_memory
&other);
45
52
void
attach(
void
*start_ptr,
std
::
size_t
max_size) LIBCOPP_MACRO_NOEXCEPT;
53
60
void
allocate(
stack_context
&ctx,
std
::
size_t
size) LIBCOPP_MACRO_NOEXCEPT;
61
66
void
deallocate(
stack_context
&ctx) LIBCOPP_MACRO_NOEXCEPT;
67
};
24
class
LIBCOPP_COPP_API
stack_allocator_memory
{
…
};
68
}
// namespace allocator
69
LIBCOPP_COPP_NAMESPACE_END
70
71
#ifdef LIBCOPP_HAS_ABI_HEADERS
72
# include LIBCOPP_ABI_SUFFIX
73
#endif
allocator::stack_allocator_memory
memory allocator this allocator will return address of specified memory section
Definition
stack_allocator_memory.h:24
allocator::stack_allocator_memory::memory_size_
std::size_t memory_size_
Definition
stack_allocator_memory.h:27
allocator::stack_allocator_memory::start_ptr_
void * start_ptr_
Definition
stack_allocator_memory.h:26
allocator::stack_allocator_memory::is_used_
bool is_used_
Definition
stack_allocator_memory.h:28
features.h
allocator
Definition
stack_allocator_malloc.h:18
std
STL namespace.
stack_context
Definition
stack_context.h:18
Generated by
1.9.8