diff options
Diffstat (limited to 'omni/memory.h')
| -rw-r--r-- | omni/memory.h | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/omni/memory.h b/omni/memory.h deleted file mode 100644 index def1cc0..0000000 --- a/omni/memory.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef OMNI_MEMORY_H -#define OMNI_MEMORY_H - -#include "stdint.h" - -struct Layout { - usize size; - usize align; - - template <typename T> - constexpr static Layout of(usize n) noexcept { - return Layout{n * sizeof(T), alignof(T)}; - } - - static bool from(usize size, usize align) noexcept { - return Layout{size, align}; - } -}; - -struct Allocator { - virtual u8* allocate(Layout layout) noexcept; - virtual void deallocate(u8* ptr); -}; - -#endif |
