浏览代码

Reverted memory allocators additional checks

Ray 1 年之前
父节点
当前提交
fbd79cde5f
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      src/raylib.h

+ 2 - 3
src/raylib.h

@@ -123,12 +123,11 @@
 
 // Allow custom memory allocators
 // NOTE: Require recompiling raylib sources
-#define MAX_ALLOC_SIZE 1024*1024    // 1GB of maximum allocation data
 #ifndef RL_MALLOC
-    #define RL_MALLOC(sz)       ((sz > MAX_ALLOC_SIZE)? malloc(sz) : NULL)
+    #define RL_MALLOC(sz)       malloc(sz)
 #endif
 #ifndef RL_CALLOC
-    #define RL_CALLOC(n,sz)     ((n*sz > MAX_ALLOC_SIZE)? calloc(n,sz) : NULL) 
+    #define RL_CALLOC(n,sz)     calloc(n,sz)
 #endif
 #ifndef RL_REALLOC
     #define RL_REALLOC(ptr,sz)  realloc(ptr,sz)