summaryrefslogtreecommitdiff
path: root/src/windows/gperftools/tcmalloc.h
diff options
context:
space:
mode:
authorAliaksey Kandratsenka <alkondratenko@gmail.com>2015-10-04 21:12:28 -0700
committerAliaksey Kandratsenka <alkondratenko@gmail.com>2015-10-05 21:07:00 -0700
commit1e7b733a217b2e92f6188b27951dfaf22ac1e2f3 (patch)
tree5f2924633f980b63e47713d6ea49160260cf41da /src/windows/gperftools/tcmalloc.h
parentfdb443e8e5fc5115b68da3be8201d3bef0722ba4 (diff)
downloadgperftools-1e7b733a217b2e92f6188b27951dfaf22ac1e2f3.tar.gz
implemented (disabled by default) sized delete supportwip-from-alk-for-review
gcc 5 and clang++-3.7 support sized deallocation from C++14. We are taking advantage of that by defining sized versions of operator delete. This is off by default so that if some existing programs that define own global operator delete without sized variant are not broken by tcmalloc's sized delete operator. There is also risk of breaking exiting code that deletes objects using wrong class (i.e. base class) without having virtual destructors.
Diffstat (limited to 'src/windows/gperftools/tcmalloc.h')
-rw-r--r--src/windows/gperftools/tcmalloc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/windows/gperftools/tcmalloc.h b/src/windows/gperftools/tcmalloc.h
index 5867c7c..9c4753f 100644
--- a/src/windows/gperftools/tcmalloc.h
+++ b/src/windows/gperftools/tcmalloc.h
@@ -112,12 +112,14 @@ extern "C" {
PERFTOOLS_DLL_DECL void* tc_new_nothrow(size_t size,
const std::nothrow_t&) __THROW;
PERFTOOLS_DLL_DECL void tc_delete(void* p) __THROW;
+ PERFTOOLS_DLL_DECL void tc_delete_sized(void* p, size_t size) throw();
PERFTOOLS_DLL_DECL void tc_delete_nothrow(void* p,
const std::nothrow_t&) __THROW;
PERFTOOLS_DLL_DECL void* tc_newarray(size_t size);
PERFTOOLS_DLL_DECL void* tc_newarray_nothrow(size_t size,
const std::nothrow_t&) __THROW;
PERFTOOLS_DLL_DECL void tc_deletearray(void* p) __THROW;
+ PERFTOOLS_DLL_DECL void tc_deletearray_sized(void* p, size_t size) throw();
PERFTOOLS_DLL_DECL void tc_deletearray_nothrow(void* p,
const std::nothrow_t&) __THROW;
}