| OLD | NEW |
| (Empty) |
| 1 /* Alloc.h -- Memory allocation functions | |
| 2 2009-02-07 : Igor Pavlov : Public domain | |
| 3 in the public domain */ | |
| 4 | |
| 5 #ifndef __COMMON_ALLOC_H | |
| 6 #define __COMMON_ALLOC_H | |
| 7 | |
| 8 #include <stddef.h> | |
| 9 | |
| 10 #ifdef __cplusplus | |
| 11 extern "C" { | |
| 12 #endif | |
| 13 | |
| 14 void *MyAlloc(size_t size); | |
| 15 void MyFree(void *address); | |
| 16 | |
| 17 #ifdef _WIN32 | |
| 18 | |
| 19 void SetLargePageSize(); | |
| 20 | |
| 21 void *MidAlloc(size_t size); | |
| 22 void MidFree(void *address); | |
| 23 void *BigAlloc(size_t size); | |
| 24 void BigFree(void *address); | |
| 25 | |
| 26 #else | |
| 27 | |
| 28 #define MidAlloc(size) MyAlloc(size) | |
| 29 #define MidFree(address) MyFree(address) | |
| 30 #define BigAlloc(size) MyAlloc(size) | |
| 31 #define BigFree(address) MyFree(address) | |
| 32 | |
| 33 #endif | |
| 34 | |
| 35 #ifdef __cplusplus | |
| 36 } | |
| 37 #endif | |
| 38 | |
| 39 #endif | |
| OLD | NEW |