]> git.ipfire.org Git - thirdparty/squid.git/blob - src/SquidNew.cc
Bug 4610: compile errors on Solaris 11.3 with Oracle Studio 12.5
[thirdparty/squid.git] / src / SquidNew.cc
1 /*
2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 /* DEBUG: none Memory Allocation */
10
11 #include "squid.h"
12
13 #if !defined(__clang__) && !defined(__SUNPRO_CC)
14
15 #include <new>
16
17 void *operator new(size_t size)
18 {
19 return xmalloc(size);
20 }
21 void operator delete(void *address)
22 {
23 xfree(address);
24 }
25 void *operator new[](size_t size)
26 {
27 return xmalloc(size);
28 }
29 void operator delete[](void *address)
30 {
31 xfree(address);
32 }
33
34 void *operator new(size_t size, const std::nothrow_t &tag)
35 {
36 return xmalloc(size);
37 }
38 void operator delete(void *address, const std::nothrow_t &tag)
39 {
40 xfree(address);
41 }
42 void *operator new[](size_t size, const std::nothrow_t &tag)
43 {
44 return xmalloc(size);
45 }
46 void operator delete[](void *address, const std::nothrow_t &tag)
47 {
48 xfree(address);
49 }
50
51 #endif /* !defined(__clang__) */
52