mirror of
https://github.com/mangosfour/server.git
synced 2025-12-28 04:37:04 +00:00
[12772] Removed TBB
added some definitions for clang compiler
This commit is contained in:
parent
c4faf3a816
commit
0df5d7fccb
264 changed files with 5 additions and 57306 deletions
|
|
@ -1,75 +0,0 @@
|
|||
/**
|
||||
* This code is part of MaNGOS. Contributor & Copyright details are in AUTHORS/THANKS.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
// lets use Intel scalable_allocator by default and
|
||||
// switch to OS specific allocator only when _STANDARD_MALLOC is defined
|
||||
#ifndef USE_STANDARD_MALLOC
|
||||
|
||||
#include "../../dep/tbb/include/tbb/scalable_allocator.h"
|
||||
|
||||
void* operator new(size_t sz)
|
||||
{
|
||||
void* res = scalable_malloc(sz);
|
||||
|
||||
if (res == NULL)
|
||||
throw std::bad_alloc();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void* operator new[](size_t sz)
|
||||
{
|
||||
void* res = scalable_malloc(sz);
|
||||
|
||||
if (res == NULL)
|
||||
throw std::bad_alloc();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void operator delete(void* ptr) throw()
|
||||
{
|
||||
scalable_free(ptr);
|
||||
}
|
||||
|
||||
void operator delete[](void* ptr) throw()
|
||||
{
|
||||
scalable_free(ptr);
|
||||
}
|
||||
|
||||
void* operator new(size_t sz, const std::nothrow_t&) throw()
|
||||
{
|
||||
return scalable_malloc(sz);
|
||||
}
|
||||
|
||||
void* operator new[](size_t sz, const std::nothrow_t&) throw()
|
||||
{
|
||||
return scalable_malloc(sz);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr, const std::nothrow_t&) throw()
|
||||
{
|
||||
scalable_free(ptr);
|
||||
}
|
||||
|
||||
void operator delete[](void* ptr, const std::nothrow_t&) throw()
|
||||
{
|
||||
scalable_free(ptr);
|
||||
}
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue