139 };
140
141 typedef MemoryType MEMFLAGS;
142
143
144 #if INCLUDE_NMT
145
146 extern bool NMT_track_callsite;
147
148 #else
149
150 const bool NMT_track_callsite = false;
151
152 #endif // INCLUDE_NMT
153
154 class NativeCallStack;
155
156
157 template <MEMFLAGS F> class CHeapObj ALLOCATION_SUPER_CLASS_SPEC {
158 public:
159 NOINLINE void* operator new(size_t size, const NativeCallStack& stack) throw();
160 NOINLINE void* operator new(size_t size) throw();
161 NOINLINE void* operator new (size_t size, const std::nothrow_t& nothrow_constant,
162 const NativeCallStack& stack) throw();
163 NOINLINE void* operator new (size_t size, const std::nothrow_t& nothrow_constant)
164 throw();
165 NOINLINE void* operator new [](size_t size, const NativeCallStack& stack) throw();
166 NOINLINE void* operator new [](size_t size) throw();
167 NOINLINE void* operator new [](size_t size, const std::nothrow_t& nothrow_constant,
168 const NativeCallStack& stack) throw();
169 NOINLINE void* operator new [](size_t size, const std::nothrow_t& nothrow_constant)
170 throw();
171 void operator delete(void* p);
172 void operator delete [] (void* p);
173 };
174
175 // Base class for objects allocated on the stack only.
176 // Calling new or delete will result in fatal error.
177
178 class StackObj ALLOCATION_SUPER_CLASS_SPEC {
179 private:
180 void* operator new(size_t size) throw();
181 void* operator new [](size_t size) throw();
182 #ifdef __IBMCPP__
183 public:
184 #endif
185 void operator delete(void* p);
186 void operator delete [](void* p);
187 };
188
189 // Base class for objects stored in Metaspace.
190 // Calling delete will result in fatal error.
|
139 };
140
141 typedef MemoryType MEMFLAGS;
142
143
144 #if INCLUDE_NMT
145
146 extern bool NMT_track_callsite;
147
148 #else
149
150 const bool NMT_track_callsite = false;
151
152 #endif // INCLUDE_NMT
153
154 class NativeCallStack;
155
156
157 template <MEMFLAGS F> class CHeapObj ALLOCATION_SUPER_CLASS_SPEC {
158 public:
159 void* operator new(size_t size, const NativeCallStack& stack) throw();
160 void* operator new(size_t size) throw();
161 void* operator new (size_t size, const std::nothrow_t& nothrow_constant,
162 const NativeCallStack& stack) throw();
163 void* operator new (size_t size, const std::nothrow_t& nothrow_constant) throw();
164 void* operator new [](size_t size, const NativeCallStack& stack) throw();
165 void* operator new [](size_t size) throw();
166 void* operator new [](size_t size, const std::nothrow_t& nothrow_constant,
167 const NativeCallStack& stack) throw();
168 void* operator new [](size_t size, const std::nothrow_t& nothrow_constant) throw();
169 void operator delete(void* p);
170 void operator delete [] (void* p);
171 };
172
173 // Base class for objects allocated on the stack only.
174 // Calling new or delete will result in fatal error.
175
176 class StackObj ALLOCATION_SUPER_CLASS_SPEC {
177 private:
178 void* operator new(size_t size) throw();
179 void* operator new [](size_t size) throw();
180 #ifdef __IBMCPP__
181 public:
182 #endif
183 void operator delete(void* p);
184 void operator delete [](void* p);
185 };
186
187 // Base class for objects stored in Metaspace.
188 // Calling delete will result in fatal error.
|