mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 00:03:03 +01:00
Libreoffice patch : C++11: new/delete replacement functions cannot be inline https://www.mail-archive.com/libreoffice@lists.freedesktop.org/msg79870.html
This commit is contained in:
parent
f7846ceb57
commit
b1e9feb527
@ -2103,3 +2103,21 @@ void AutoStorage::ProbeStack() const
|
||||
#endif
|
||||
|
||||
} // namespace Firebird
|
||||
|
||||
void* operator new(size_t s) THROW_BAD_ALLOC
|
||||
{
|
||||
return Firebird::MemoryPool::globalAlloc(s);
|
||||
}
|
||||
void* operator new[](size_t s) THROW_BAD_ALLOC
|
||||
{
|
||||
return Firebird::MemoryPool::globalAlloc(s);
|
||||
}
|
||||
|
||||
void operator delete(void* mem) throw()
|
||||
{
|
||||
Firebird::MemoryPool::globalFree(mem);
|
||||
}
|
||||
void operator delete[](void* mem) throw()
|
||||
{
|
||||
Firebird::MemoryPool::globalFree(mem);
|
||||
}
|
||||
|
@ -492,23 +492,11 @@ using Firebird::MemoryPool;
|
||||
inline static MemoryPool* getDefaultMemoryPool() { return Firebird::MemoryPool::processMemoryPool; }
|
||||
|
||||
// Global versions of operators new and delete
|
||||
inline void* operator new(size_t s) THROW_BAD_ALLOC
|
||||
{
|
||||
return Firebird::MemoryPool::globalAlloc(s);
|
||||
}
|
||||
inline void* operator new[](size_t s) THROW_BAD_ALLOC
|
||||
{
|
||||
return Firebird::MemoryPool::globalAlloc(s);
|
||||
}
|
||||
void* operator new(size_t s) THROW_BAD_ALLOC;
|
||||
void* operator new[](size_t s) THROW_BAD_ALLOC;
|
||||
|
||||
inline void operator delete(void* mem) throw()
|
||||
{
|
||||
Firebird::MemoryPool::globalFree(mem);
|
||||
}
|
||||
inline void operator delete[](void* mem) throw()
|
||||
{
|
||||
Firebird::MemoryPool::globalFree(mem);
|
||||
}
|
||||
void operator delete(void* mem) throw();
|
||||
void operator delete[](void* mem) throw();
|
||||
|
||||
#ifdef DEBUG_GDS_ALLOC
|
||||
inline void* operator new(size_t s, Firebird::MemoryPool& pool, const char* file, int line)
|
||||
|
Loading…
Reference in New Issue
Block a user