Support custom memory allocators

This commit is contained in:
raysan5 2020-01-19 12:10:09 +01:00
parent d797bb3e1c
commit 1c4dadcf68
2 changed files with 41 additions and 30 deletions

View file

@ -91,6 +91,17 @@
#define NOMCX // Modem Configuration Extensions
#define MMNOSOUND
// Allow custom memory allocators
#ifndef RNET_MALLOC
#define RNET_MALLOC(sz) malloc(sz)
#endif
#ifndef RNET_CALLOC
#define RNET_CALLOC(n,sz) calloc(n,sz)
#endif
#ifndef RNET_FREE
#define RNET_FREE(p) free(p)
#endif
//----------------------------------------------------------------------------------
// Platform type definitions
// From: https://github.com/DFHack/clsocket/blob/master/src/Host.h