diff options
author | Aliaksey Kandratsenka <alkondratenko@gmail.com> | 2017-12-09 08:51:19 -0800 |
---|---|---|
committer | Aliaksey Kandratsenka <alkondratenko@gmail.com> | 2017-12-09 09:06:52 -0800 |
commit | 0bccb5e658762f30e6e3abbc40dc244e8f8911c1 (patch) | |
tree | 7697e28e8864c2cb5a9680b4a9da900c3021ce22 | |
parent | 8b1d13c631024ce7e80508c284c7bc5b1327e131 (diff) | |
download | gperftools-0bccb5e658762f30e6e3abbc40dc244e8f8911c1.tar.gz |
fix malloc fast path for patched windows functions
malloc_fast_path now receives oom function instead of full allocation
function and windows/patch_function.cc wasn't updated until now. It
caused assertion failures as reported in issue #944.
-rw-r--r-- | src/windows/patch_functions.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/windows/patch_functions.cc b/src/windows/patch_functions.cc index 20a944f..5417880 100644 --- a/src/windows/patch_functions.cc +++ b/src/windows/patch_functions.cc @@ -805,7 +805,7 @@ bool PatchAllModules() { template<int T> void* LibcInfoWithPatchFunctions<T>::Perftools_malloc(size_t size) __THROW { - return malloc_fast_path<tcmalloc::allocate_full_malloc_oom>(size); + return malloc_fast_path<tcmalloc::malloc_oom>(size); } template<int T> @@ -858,12 +858,12 @@ void* LibcInfoWithPatchFunctions<T>::Perftools_calloc( template<int T> void* LibcInfoWithPatchFunctions<T>::Perftools_new(size_t size) { - return malloc_fast_path<tcmalloc::allocate_full_cpp_throw_oom>(size); + return malloc_fast_path<tcmalloc::cpp_throw_oom>(size); } template<int T> void* LibcInfoWithPatchFunctions<T>::Perftools_newarray(size_t size) { - return malloc_fast_path<tcmalloc::allocate_full_cpp_throw_oom>(size); + return malloc_fast_path<tcmalloc::cpp_throw_oom>(size); } template<int T> @@ -881,13 +881,13 @@ void LibcInfoWithPatchFunctions<T>::Perftools_deletearray(void *p) { template<int T> void* LibcInfoWithPatchFunctions<T>::Perftools_new_nothrow( size_t size, const std::nothrow_t&) __THROW { - return malloc_fast_path<tcmalloc::allocate_full_cpp_nothrow_oom>(size); + return malloc_fast_path<tcmalloc::cpp_nothrow_oom>(size); } template<int T> void* LibcInfoWithPatchFunctions<T>::Perftools_newarray_nothrow( size_t size, const std::nothrow_t&) __THROW { - return malloc_fast_path<tcmalloc::allocate_full_cpp_nothrow_oom>(size); + return malloc_fast_path<tcmalloc::cpp_nothrow_oom>(size); } template<int T> |