rlm@1: /* Alloc.h -- Memory allocation functions rlm@1: 2008-03-13 rlm@1: Igor Pavlov rlm@1: Public domain */ rlm@1: rlm@1: #ifndef __COMMON_ALLOC_H rlm@1: #define __COMMON_ALLOC_H rlm@1: rlm@1: #include rlm@1: rlm@1: void *MyAlloc(size_t size); rlm@1: void MyFree(void *address); rlm@1: rlm@1: #ifdef _WIN32 rlm@1: rlm@1: void SetLargePageSize(); rlm@1: rlm@1: void *MidAlloc(size_t size); rlm@1: void MidFree(void *address); rlm@1: void *BigAlloc(size_t size); rlm@1: void BigFree(void *address); rlm@1: rlm@1: #else rlm@1: rlm@1: #define MidAlloc(size) MyAlloc(size) rlm@1: #define MidFree(address) MyFree(address) rlm@1: #define BigAlloc(size) MyAlloc(size) rlm@1: #define BigFree(address) MyFree(address) rlm@1: rlm@1: #endif rlm@1: rlm@1: #endif