IceShard
1
A personal game engine project, with development focused on 2D/2.5D games.
Toggle main menu visibility
Loading...
Searching...
No Matches
memsys
public
ice
mem_allocator_null.hxx
Go to the documentation of this file.
1
3
4
#pragma once
5
#include <
ice/mem_allocator.hxx
>
6
7
namespace
ice
8
{
9
10
class
NullAllocator
final :
public
ice::Allocator
11
{
12
public
:
13
NullAllocator
(std::source_location src_loc = std::source_location::current()) noexcept
14
:
ice
::
Allocator
{ src_loc }
15
{ }
16
17
protected
:
18
auto
do_allocate
(
ice::AllocRequest
)
noexcept
->
ice::AllocResult
override
19
{
20
return
{
nullptr
, 0_B,
ice::ualign::invalid
};
21
}
22
23
void
do_deallocate
(
void
*)
noexcept
override
{ }
24
};
25
26
static
NullAllocator
Global_NullAllocator
{};
27
28
}
// namespace ice
ice::NullAllocator
Definition
mem_allocator_null.hxx:11
ice::NullAllocator::NullAllocator
NullAllocator(std::source_location src_loc=std::source_location::current()) noexcept
Definition
mem_allocator_null.hxx:13
ice::NullAllocator::do_allocate
auto do_allocate(ice::AllocRequest) noexcept -> ice::AllocResult override
Definition
mem_allocator_null.hxx:18
ice::NullAllocator::do_deallocate
void do_deallocate(void *) noexcept override
Definition
mem_allocator_null.hxx:23
mem_allocator.hxx
ice
SPDX-License-Identifier: MIT.
Definition
array.hxx:12
ice::Allocator
ice::AllocatorBase< ice::build::is_debug||ice::build::is_develop > Allocator
Definition
mem_types.hxx:25
ice::ualign::invalid
@ invalid
Definition
mem_size_types.hxx:40
ice::Global_NullAllocator
static NullAllocator Global_NullAllocator
Definition
mem_allocator_null.hxx:26
ice::AllocRequest
Definition
mem.hxx:16
ice::AllocResult
Definition
mem.hxx:44
Generated by
1.18.0