MemoryAllocationInterface/MemoryAllocationInterface.h

23 lines
480 B
C

//
// 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