From 336005489a1ce2f7d6365f13fca5020e129a5dbd Mon Sep 17 00:00:00 2001 From: "huanr@chromium.org" <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> Date: Sun, 2 Aug 2009 05:51:12 +0000 Subject: [PATCH] Revert r22080 and re-enable tcmalloc. Review URL: http://codereview.chromium.org/159771 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22251 0039d316-1c4b-4281-b951-d872f2087c98 --- build/all.gyp | 1 + chrome/app/chrome_dll_main.cc | 4 ++-- chrome/chrome.gyp | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build/all.gyp b/build/all.gyp index ff888adc715c7..8de4152960e29 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -75,6 +75,7 @@ '../third_party/bsdiff/bsdiff.gyp:*', '../third_party/bspatch/bspatch.gyp:*', '../third_party/cld/cld.gyp:*', + '../third_party/tcmalloc/tcmalloc.gyp:*', '../tools/memory_watcher/memory_watcher.gyp:*', '../webkit/activex_shim/activex_shim.gyp:*', '../webkit/activex_shim_dll/activex_shim_dll.gyp:*', diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index 478140c104e3f..43c22cfcb5156 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -226,8 +226,8 @@ void RegisterInvalidParamHandler() { _set_purecall_handler(PureCall); // Gather allocation failure. std::set_new_handler(&OnNoMemory); - // TODO: use _set_new_mode to enable the new handler for malloc() based - // failures. + // Also enable the new handler for malloc() based failures. + _set_new_mode(1); #endif } diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 4c6cd567b405c..236c80f4c0dd7 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -4555,6 +4555,7 @@ '../third_party/modp_b64/modp_b64.gyp:*', '../third_party/npapi/npapi.gyp:*', '../third_party/sqlite/sqlite.gyp:*', + '../third_party/tcmalloc/tcmalloc.gyp:*', '../third_party/zlib/zlib.gyp:*', '../webkit/tools/test_shell/test_shell.gyp:*', '../webkit/webkit.gyp:*', @@ -4593,6 +4594,7 @@ '../net/net.gyp:net_resources', '../build/util/support/support.gyp:*', '../third_party/cld/cld.gyp:cld', + '../third_party/tcmalloc/tcmalloc.gyp:tcmalloc', '../views/views.gyp:views', '../webkit/webkit.gyp:webkit_resources', '../gears/gears.gyp:gears', -- GitLab