Support custom memory management macros

Users can define their custom memory management macros.

NOTE: Most external libraries support custom macros in the same way, raylib should redefine those macros to raylib ones, to unify custom memory loading. That redefinition is only implemented as example for stb_image.h in [textures] module.
This commit is contained in:
Ray 2019-04-23 14:55:35 +02:00
commit e67ebabb02
9 changed files with 365 additions and 339 deletions

View file

@ -45,10 +45,10 @@
#include <android/asset_manager.h> // Required for: Android assets manager: AAsset, AAssetManager_open(), ...
#endif
#include <stdlib.h> // Required for: malloc(), free()
#include <stdio.h> // Required for: fopen(), fclose(), fputc(), fwrite(), printf(), fprintf(), funopen()
#include <stdlib.h> // Required for: exit()
#include <stdio.h> // Required for: printf(), sprintf()
#include <stdarg.h> // Required for: va_list, va_start(), vfprintf(), va_end()
#include <string.h> // Required for: strlen(), strrchr(), strcmp()
#include <string.h> // Required for: strcpy(), strcat()
#define MAX_TRACELOG_BUFFER_SIZE 128 // Max length of one trace-log message