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