Update Files
This commit is contained in:
32
Kha/Backends/Kinc-hxcpp/khacpp/include/hx/Memory.h
Normal file
32
Kha/Backends/Kinc-hxcpp/khacpp/include/hx/Memory.h
Normal file
@ -0,0 +1,32 @@
|
||||
#ifdef HX_MEMORY_H_OVERRIDE
|
||||
// Users can define their own header to use here, but there is no API
|
||||
// compatibility gaurantee for future changes.
|
||||
#include HX_MEMORY_H_OVERRIDE
|
||||
|
||||
// Todo - special version?
|
||||
inline void HxFreeGCBlock(void *p) {
|
||||
HxFree(p);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#ifndef HX_MEMORY_H
|
||||
#define HX_MEMORY_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
inline void *HxAlloc(size_t size) {
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
inline void HxFree(void *p) {
|
||||
free(p);
|
||||
}
|
||||
|
||||
void *HxAllocGCBlock(size_t size);
|
||||
void HxFreeGCBlock(void *p);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user