diff options
Diffstat (limited to 'src/extmalloc.h')
-rw-r--r-- | src/extmalloc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/extmalloc.h b/src/extmalloc.h index eb41730..6297360 100644 --- a/src/extmalloc.h +++ b/src/extmalloc.h @@ -23,10 +23,18 @@ * These functions are just like malloc/realloc/free, but they call into * Valve's memory allocator wrapper, which ensures that allocations crossing * plugin/engine boundaries won't cause any weird issues. + * + * On Linux, there is no allocation wrapper, but these still do their own OoM + * checking, so there's no need to think about that. */ void *extmalloc(usize sz); void *extrealloc(void *mem, usize sz); +#ifdef _WIN32 void extfree(void *mem); +#else +void free(void *); +#define extfree free +#endif #endif |