Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:07:28

0001 /* Alloc.h -- Memory allocation functions

0002 2009-02-07 : Igor Pavlov : Public domain */
0003 
0004 #ifndef __COMMON_ALLOC_H
0005 #define __COMMON_ALLOC_H
0006 
0007 #include <cstddef>
0008 
0009 #ifdef __cplusplus
0010 extern "C" {
0011 #endif
0012 
0013 void *MyAlloc(size_t size);
0014 void MyFree(void *address);
0015 
0016 #ifdef _WIN32
0017 
0018 void SetLargePageSize();
0019 
0020 void *MidAlloc(size_t size);
0021 void MidFree(void *address);
0022 void *BigAlloc(size_t size);
0023 void BigFree(void *address);
0024 
0025 #else
0026 
0027 #define MidAlloc(size) MyAlloc(size)
0028 #define MidFree(address) MyFree(address)
0029 #define BigAlloc(size) MyAlloc(size)
0030 #define BigFree(address) MyFree(address)
0031 
0032 #endif
0033 
0034 #ifdef __cplusplus
0035 }
0036 #endif
0037 
0038 #endif