diff --git a/BeefLibs/corlib/src/Allocator.bf b/BeefLibs/corlib/src/Allocator.bf new file mode 100644 index 00000000..4c04db78 --- /dev/null +++ b/BeefLibs/corlib/src/Allocator.bf @@ -0,0 +1,21 @@ +namespace System +{ + interface IRawAllocator + { + void* Alloc(int size, int align); + void Free(void* ptr); + } + + struct StdAllocator : IRawAllocator + { + public void* Alloc(int size, int align) + { + return Internal.StdMalloc(size); + } + + public void Free(void* ptr) + { + Internal.StdFree(ptr); + } + } +}