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