diff options
| author | Ray <raysan5@gmail.com> | 2019-04-23 15:14:15 +0200 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2019-04-23 15:14:15 +0200 |
| commit | 4ad81ba2d47890303dfa0ee33d39097fcce856b8 (patch) | |
| tree | 1845554659272be4f4b60311d1ed47ce63cd5dd8 | |
| parent | 87b75a6c95db503e2a1688e389e9db9e53936d62 (diff) | |
| download | raylib-4ad81ba2d47890303dfa0ee33d39097fcce856b8.tar.gz raylib-4ad81ba2d47890303dfa0ee33d39097fcce856b8.zip | |
Alloc custom allocators on standalone mode
| -rw-r--r-- | src/rlgl.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -72,6 +72,17 @@ #else #define RLAPI // We are building or using raylib as a static library (or Linux shared library) #endif + + // Allow custom memory allocators + #ifndef RL_MALLOC + #define RL_MALLOC(sz) malloc(sz) + #endif + #ifndef RL_CALLOC + #define RL_CALLOC(n,sz) calloc(n,sz) + #endif + #ifndef RL_FREE + #define RL_FREE(p) free(p) + #endif #else #include "raylib.h" // Required for: Model, Shader, Texture2D, TraceLog() #endif |
