summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authordank@chromium.org <dank@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-03 21:07:47 +0000
committerdank@chromium.org <dank@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-03 21:07:47 +0000
commit7e0d664aad3baa2c8af840addc75e1cebae75702 (patch)
tree24d17986c6796be6b3f5c522df0c58311d96bb82 /chrome/renderer
parent2947cdcd14aa838dafc8c248e91e594fa4b15520 (diff)
downloadchromium_src-7e0d664aad3baa2c8af840addc75e1cebae75702.zip
chromium_src-7e0d664aad3baa2c8af840addc75e1cebae75702.tar.gz
chromium_src-7e0d664aad3baa2c8af840addc75e1cebae75702.tar.bz2
Make no-tcmalloc (really, non-base/allocator) builds work again,
(i.e. this is a plain vanilla build used when layers like base/allocator are getting in the way of debugging) and make sure they use msvcrt rather than libcmt (libcmt is used to help shim malloc/free, but it gets in the way of valgrind doing the same thing). Sadly, this is now a gyp-time operation rather than a Configuration option. Had to remove hardcoded C prototype for _set_new_mode, as that caused link errors. Also add variables win_{release,debug}_{Optimization,RuntimeLibrary} to let the valgrind build override those settings. Fix calling convention on _set_new_mode to match the one in <new.h> BUG=none TEST=build with ~/.gyp/include.gypi set as described in comment in common.gypi, gclient runhooks, do release build, verify all exe's and dll's linked against msvcrt dll Review URL: http://codereview.chromium.org/455037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33719 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/render_thread.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc
index 69c8cb2..b30a69c 100644
--- a/chrome/renderer/render_thread.cc
+++ b/chrome/renderer/render_thread.cc
@@ -573,7 +573,7 @@ void RenderThread::IdleHandler() {
if (!widget_count_ || hidden_widget_count_ < widget_count_)
return;
-#if defined(OS_WIN)
+#if defined(OS_WIN) && defined(USE_TCMALLOC)
MallocExtension::instance()->ReleaseFreeMemory();
#endif
@@ -628,7 +628,7 @@ void RenderThread::OnPurgeMemory() {
while (!v8::V8::IdleNotification()) {
}
-#if defined(OS_WIN)
+#if defined(OS_WIN) && defined(USE_TCMALLOC)
// Tell tcmalloc to release any free pages it's still holding.
MallocExtension::instance()->ReleaseFreeMemory();
#endif