summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAliaksey Kandratsenka <alk@tut.by>2015-08-01 17:41:42 -0700
committerAliaksey Kandratsenka <alk@tut.by>2015-08-02 16:53:24 -0700
commit024bae96ce8e1591993fc0da191ce0a92d609481 (patch)
tree837b16dc57b73fb7b1d2d962892390ce66a2b562
parent64e0133901a20f83c41adb36748fd19d21228515 (diff)
downloadgperftools-024bae96ce8e1591993fc0da191ce0a92d609481.tar.gz
dropped support for PREANSINEW define which nobody needs anymore
-rw-r--r--src/debugallocation.cc8
-rw-r--r--src/tcmalloc.cc8
2 files changed, 0 insertions, 16 deletions
diff --git a/src/debugallocation.cc b/src/debugallocation.cc
index 1f6296b..46a9889 100644
--- a/src/debugallocation.cc
+++ b/src/debugallocation.cc
@@ -1177,9 +1177,6 @@ REGISTER_MODULE_DESTRUCTOR(debugallocation, {
inline void* debug_cpp_alloc(size_t size, int new_type, bool nothrow) {
for (;;) {
void* p = DebugAllocate(size, new_type);
-#ifdef PREANSINEW
- return p;
-#else
if (p == NULL) { // allocation failed
// Get the current new handler. NB: this function is not
// thread-safe. We make a feeble stab at making it so here, but
@@ -1218,7 +1215,6 @@ inline void* debug_cpp_alloc(size_t size, int new_type, bool nothrow) {
} else { // allocation success
return p;
}
-#endif // PREANSINEW
}
}
@@ -1386,9 +1382,6 @@ static void *do_debug_memalign(size_t alignment, size_t size) {
static void* debug_cpp_memalign(size_t align, size_t size) {
for (;;) {
void* p = do_debug_memalign(align, size);
-#ifdef PREANSINEW
- return p;
-#else
if (p == NULL) { // allocation failed
// Get the current new handler. NB: this function is not
// thread-safe. We make a feeble stab at making it so here, but
@@ -1425,7 +1418,6 @@ static void* debug_cpp_memalign(size_t align, size_t size) {
} else { // allocation success
return p;
}
-#endif // PREANSINEW
}
}
diff --git a/src/tcmalloc.cc b/src/tcmalloc.cc
index dff3e7d..a8dc8df 100644
--- a/src/tcmalloc.cc
+++ b/src/tcmalloc.cc
@@ -1427,9 +1427,6 @@ inline struct mallinfo do_mallinfo() {
static SpinLock set_new_handler_lock(SpinLock::LINKER_INITIALIZED);
inline void* cpp_alloc(size_t size, bool nothrow) {
-#ifdef PREANSINEW
- return do_malloc(size);
-#else
for (;;) {
void* p = do_malloc_no_errno(size);
if (UNLIKELY(p == NULL)) { // allocation failed
@@ -1470,7 +1467,6 @@ inline void* cpp_alloc(size_t size, bool nothrow) {
} else { // allocation success
return p;
}
-#endif // PREANSINEW
}
fail:
errno = ENOMEM;
@@ -1480,9 +1476,6 @@ fail:
void* cpp_memalign(size_t align, size_t size) {
for (;;) {
void* p = do_memalign(align, size);
-#ifdef PREANSINEW
- return p;
-#else
if (UNLIKELY(p == NULL)) { // allocation failed
// Get the current new handler. NB: this function is not
// thread-safe. We make a feeble stab at making it so here, but
@@ -1519,7 +1512,6 @@ void* cpp_memalign(size_t align, size_t size) {
} else { // allocation success
return p;
}
-#endif // PREANSINEW
}
}