File indexing completed on 2025-06-30 08:43:33
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _Standard_DefineAlloc_HeaderFile
0017 #define _Standard_DefineAlloc_HeaderFile
0018
0019
0020
0021 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)
0022 # define DEFINE_STANDARD_ALLOC_ARRAY
0023 # else
0024 # define DEFINE_STANDARD_ALLOC_ARRAY \
0025 void* operator new[] (size_t theSize) \
0026 { \
0027 return Standard::Allocate (theSize); \
0028 } \
0029 void operator delete[] (void* theAddress) \
0030 { \
0031 Standard::Free (theAddress); \
0032 }
0033 # endif
0034
0035
0036
0037
0038 # if defined(__BORLANDC__) || (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530))
0039 # define DEFINE_STANDARD_ALLOC_PLACEMENT \
0040 void* operator new (size_t, void* theAddress) \
0041 { \
0042 return theAddress; \
0043 }
0044 # else
0045 # define DEFINE_STANDARD_ALLOC_PLACEMENT \
0046 void* operator new (size_t, void* theAddress) \
0047 { \
0048 return theAddress; \
0049 } \
0050 void operator delete (void*, void*) \
0051 { \
0052 }
0053 # endif
0054
0055
0056 # define DEFINE_STANDARD_ALLOC \
0057 void* operator new (size_t theSize) \
0058 { \
0059 return Standard::Allocate (theSize); \
0060 } \
0061 void operator delete (void* theAddress) \
0062 { \
0063 Standard::Free (theAddress); \
0064 } \
0065 DEFINE_STANDARD_ALLOC_ARRAY \
0066 DEFINE_STANDARD_ALLOC_PLACEMENT
0067
0068
0069 #ifndef WORKAROUND_SUNPRO_NEW_PLACEMENT
0070 #define WORKAROUND_SUNPRO_NEW_PLACEMENT
0071 #if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x420)
0072 inline void* operator new(size_t,void* anAddress)
0073 {
0074 return anAddress;
0075 }
0076 #endif
0077 #endif
0078
0079
0080
0081
0082
0083
0084 #if defined(_MSC_VER)
0085 #define STANDARD_ALIGNED(theAlignment, theType, theVar) __declspec(align(theAlignment)) theType theVar
0086 #elif defined(__GNUC__)
0087 #define STANDARD_ALIGNED(theAlignment, theType, theVar) theType __attribute__ ((aligned (theAlignment))) theVar
0088 #else
0089 #define STANDARD_ALIGNED(theAlignment, theType, theVar) theType theVar
0090 #endif
0091
0092 #endif