Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: base/allocator/allocator_shim.cc

Issue 7050034: Merge google-perftools r109 (the current contents of third_party/tcmalloc/vendor) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/allocator/allocator.gyp ('k') | third_party/tcmalloc/README.chromium » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/allocator/allocator_shim.h" 5 #include "base/allocator/allocator_shim.h"
6 6
7 #include <config.h> 7 #include <config.h>
8 #include "base/sysinfo.h"
8 9
9 // When defined, different heap allocators can be used via an environment 10 // When defined, different heap allocators can be used via an environment
10 // variable set before running the program. This may reduce the amount 11 // variable set before running the program. This may reduce the amount
11 // of inlining that we get with malloc/free/etc. Disabling makes it 12 // of inlining that we get with malloc/free/etc. Disabling makes it
12 // so that only tcmalloc can be used. 13 // so that only tcmalloc can be used.
13 #define ENABLE_DYNAMIC_ALLOCATOR_SWITCHING 14 #define ENABLE_DYNAMIC_ALLOCATOR_SWITCHING
14 15
15 // TODO(mbelshe): Ensure that all calls to tcmalloc have the proper call depth 16 // TODO(mbelshe): Ensure that all calls to tcmalloc have the proper call depth
16 // from the "user code" so that debugging tools (HeapChecker) can work. 17 // from the "user code" so that debugging tools (HeapChecker) can work.
17 18
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 char* secondary_value = secondary_length ? buffer : "TCMALLOC"; 297 char* secondary_value = secondary_length ? buffer : "TCMALLOC";
297 // Force renderer (or other subprocesses) to use secondary_value. 298 // Force renderer (or other subprocesses) to use secondary_value.
298 int ret_val = _putenv_s(primary_name, secondary_value); 299 int ret_val = _putenv_s(primary_name, secondary_value);
299 CHECK_EQ(0, ret_val); 300 CHECK_EQ(0, ret_val);
300 } 301 }
301 #endif // ENABLE_DYNAMIC_ALLOCATOR_SWITCHING 302 #endif // ENABLE_DYNAMIC_ALLOCATOR_SWITCHING
302 } 303 }
303 304
304 } // namespace base. 305 } // namespace base.
305 } // namespace allocator. 306 } // namespace allocator.
OLDNEW
« no previous file with comments | « base/allocator/allocator.gyp ('k') | third_party/tcmalloc/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698