These custom operators did not cover all new/delete cases (e.g., array
allocations), were not declared according to C++ standards (triggering
compiler warnings), and were not enabled in clang builds.
These customizations enabled custom OOM handling (for covered cases),
but it is not clear whether that feature is desirable overall, and C++
has better ways to implement such handling (i.e. set_new_handler()).
These customizations participated in collection of optional statistics
(--enable-xmalloc-statistics), but it is not clear whether that feature
implementation is good enough, and, even if it is, providing these
partial stats does not outweigh recurring customization problems.
SBufStatsAction.h \
SquidMath.cc \
SquidMath.h \
- SquidNew.cc \
StatCounters.cc \
StatCounters.h \
StatHist.cc \
MemBuf.h \
Parsing.h \
RemovalPolicy.cc \
- SquidNew.cc \
tests/stub_StoreMeta.cc \
StoreMetaUnpacker.cc \
String.cc \
+++ /dev/null
-/*
- * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
- *
- * Squid software is distributed under GPLv2+ license and includes
- * contributions from numerous individuals and organizations.
- * Please see the COPYING and CONTRIBUTORS files for details.
- */
-
-/* DEBUG: none Memory Allocation */
-
-#include "squid.h"
-
-#if !defined(__clang__) && !defined(__SUNPRO_CC)
-
-#include <new>
-
-void *operator new(size_t size)
-{
- return xmalloc(size);
-}
-void operator delete(void *address)
-{
- xfree(address);
-}
-
-#endif /* !defined(__clang__) */
-
debug.cc \
globals.cc \
SquidConfig.cc \
- SquidNew.cc \
tests/stub_fd.cc \
tests/stub_HelperChildConfig.cc \
tests/stub_libmem.cc \
SquidConfig.cc: $(top_srcdir)/src/SquidConfig.cc
cp $(top_srcdir)/src/SquidConfig.cc $@
-SquidNew.cc: $(top_srcdir)/src/SquidNew.cc
- cp $(top_srcdir)/src/SquidNew.cc $@
-
tests/stub_HelperChildConfig.cc: $(top_srcdir)/src/tests/stub_HelperChildConfig.cc
cp $(top_srcdir)/src/tests/stub_HelperChildConfig.cc $@