From 365f59bca9264afe4945eed8946565610da458d6 Mon Sep 17 00:00:00 2001 From: cfif Date: Mon, 2 Jun 2025 13:26:40 +0300 Subject: [PATCH] Init --- MemoryAllocationInterface.h | 22 ++++++++++++++++++++++ modular.json | 12 ++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 MemoryAllocationInterface.h create mode 100644 modular.json diff --git a/MemoryAllocationInterface.h b/MemoryAllocationInterface.h new file mode 100644 index 0000000..3be3958 --- /dev/null +++ b/MemoryAllocationInterface.h @@ -0,0 +1,22 @@ +// +// Created by xemon on 28.11.22. +// + +#ifndef UVEOS_ON_NATION_MEMORYALLOCATIONINTERFACE_H +#define UVEOS_ON_NATION_MEMORYALLOCATIONINTERFACE_H + +#include "stddef.h" + +typedef struct { + void *env; + + void *(*alloc)(void *env, size_t size); + + void (*free)(void *env, void *pointer); +} tMemAllocInterface; + +#define Mem_Alloc(ENV, SIZE) (ENV)->alloc((ENV)->env,SIZE) +#define Mem_Free(ENV, PTR) (ENV)->free((ENV)->env,PTR) + + +#endif //UVEOS_ON_NATION_MEMORYALLOCATIONINTERFACE_H diff --git a/modular.json b/modular.json new file mode 100644 index 0000000..5e4ed34 --- /dev/null +++ b/modular.json @@ -0,0 +1,12 @@ +{ + "dep": [ + ], + "cmake": { + "inc_dirs": [ + "./" + ], + "srcs": [ + "./**.c" + ] + } +} \ No newline at end of file