From 4ad81ba2d47890303dfa0ee33d39097fcce856b8 Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 23 Apr 2019 15:14:15 +0200 Subject: [PATCH] Alloc custom allocators on standalone mode --- src/rlgl.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/rlgl.h b/src/rlgl.h index bb421d1fa..dd2929ca0 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -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