libcopp
2.3.1
Loading...
Searching...
No Matches
include
libcopp
stack
allocator
stack_allocator_malloc.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_malloc
{
25
public
:
26
stack_allocator_malloc
() LIBCOPP_MACRO_NOEXCEPT;
27
~stack_allocator_malloc
();
28
stack_allocator_malloc
(
const
stack_allocator_malloc
&other) LIBCOPP_MACRO_NOEXCEPT;
29
stack_allocator_malloc
&operator=(
const
stack_allocator_malloc
&other) LIBCOPP_MACRO_NOEXCEPT;
30
stack_allocator_malloc
(
stack_allocator_malloc
&&other) LIBCOPP_MACRO_NOEXCEPT;
31
stack_allocator_malloc
&operator=(
stack_allocator_malloc
&&other) LIBCOPP_MACRO_NOEXCEPT;
32
39
void
allocate(
stack_context
&ctx, std::size_t size) LIBCOPP_MACRO_NOEXCEPT;
40
45
void
deallocate(
stack_context
&ctx) LIBCOPP_MACRO_NOEXCEPT;
46
};
47
}
// namespace allocator
48
LIBCOPP_COPP_NAMESPACE_END
49
50
#ifdef LIBCOPP_HAS_ABI_HEADERS
51
# include LIBCOPP_ABI_SUFFIX
52
#endif
allocator::stack_allocator_malloc
memory allocator this allocator will maintain buffer using malloc/free function
Definition
stack_allocator_malloc.h:24
features.h
allocator
Definition
stack_allocator_malloc.h:18
stack_context
Definition
stack_context.h:18
Generated by
1.9.8