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
7namespace 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
char args[3][16]
Definition avr_io.c:16
T * create(Args &&...args)
Definition allocator.hpp:10