MOS Source Code
Loading...
Searching...
No Matches
allocator.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-3.0-or-later
2
3
#pragma once
4
5
#include "
mos/mm/slab.hpp
"
6
7
namespace
mos
8
{
9
template
<
typename
T,
typename
... Args>
10
requires
HasTypeName<T>
T *
create
(Args &&...
args
)
11
{
12
static
InitOnce<Slab<T>
> slab;
13
return
slab->create(
args
...);
14
}
15
}
// namespace mos
args
char args[3][16]
Definition
avr_io.c:16
mos::HasTypeName
Definition
type_utils.hpp:29
mos
Definition
allocator.hpp:8
mos::create
T * create(Args &&...args)
Definition
allocator.hpp:10
slab.hpp
mos::InitOnce
Definition
type_utils.hpp:33
kernel
include
libs
mos
allocator.hpp
Generated on Tue Feb 18 2025 16:41:40 for MOS Source Code by
1.13.2