Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 99 | pmbaty | 1 | /* Alloc.h -- Memory allocation functions |
| 2 | 2008-03-13 |
||
| 3 | Igor Pavlov |
||
| 4 | Public domain */ |
||
| 5 | |||
| 6 | #ifndef __COMMON_ALLOC_H |
||
| 7 | #define __COMMON_ALLOC_H |
||
| 8 | |||
| 9 | #include <stddef.h> |
||
| 10 | |||
| 11 | void *MyAlloc(size_t size); |
||
| 12 | void MyFree(void *address); |
||
| 13 | |||
| 14 | #ifdef _WIN32 |
||
| 15 | |||
| 16 | void SetLargePageSize(); |
||
| 17 | |||
| 18 | void *MidAlloc(size_t size); |
||
| 19 | void MidFree(void *address); |
||
| 20 | void *BigAlloc(size_t size); |
||
| 21 | void BigFree(void *address); |
||
| 22 | |||
| 23 | #else |
||
| 24 | |||
| 25 | #define MidAlloc(size) MyAlloc(size) |
||
| 26 | #define MidFree(address) MyFree(address) |
||
| 27 | #define BigAlloc(size) MyAlloc(size) |
||
| 28 | #define BigFree(address) MyFree(address) |
||
| 29 | |||
| 30 | #endif |
||
| 31 | |||
| 32 | #endif |