8
0
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:
mapopa 2015-06-03 08:22:32 +00:00
parent f7846ceb57
commit b1e9feb527
2 changed files with 22 additions and 16 deletions

View File

@ -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);
}

View File

@ -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)