mirror of
https://github.com/gperftools/gperftools
synced 2025-01-11 00:59:56 +00:00
dropped support for PREANSINEW define which nobody needs anymore
This commit is contained in:
parent
64e0133901
commit
024bae96ce
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user