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

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

Issue 10391178: 1. Enable large object pointer offset check in release build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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_shim.h ('k') | base/allocator/tcmalloc_unittest.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/allocator/allocator_extension_thunks.h" 8 #include "base/allocator/allocator_extension_thunks.h"
9 #include "base/profiler/alternate_timer.h" 9 #include "base/profiler/alternate_timer.h"
10 #include "base/sysinfo.h" 10 #include "base/sysinfo.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 321
322 if (secondary_length || !primary_length) { 322 if (secondary_length || !primary_length) {
323 const char* secondary_value = secondary_length ? buffer : "TCMALLOC"; 323 const char* secondary_value = secondary_length ? buffer : "TCMALLOC";
324 // Force renderer (or other subprocesses) to use secondary_value. 324 // Force renderer (or other subprocesses) to use secondary_value.
325 int ret_val = _putenv_s(primary_name, secondary_value); 325 int ret_val = _putenv_s(primary_name, secondary_value);
326 DCHECK_EQ(0, ret_val); 326 DCHECK_EQ(0, ret_val);
327 } 327 }
328 #endif // ENABLE_DYNAMIC_ALLOCATOR_SWITCHING 328 #endif // ENABLE_DYNAMIC_ALLOCATOR_SWITCHING
329 } 329 }
330 330
331 void* TCMallocDoMallocForTest(size_t size) {
332 return do_malloc(size);
333 }
334
335 void TCMallocDoFreeForTest(void* ptr) {
336 do_free(ptr);
337 }
338
339 size_t ExcludeSpaceForMarkForTest(size_t size) {
340 return ExcludeSpaceForMark(size);
341 }
342
331 } // namespace allocator. 343 } // namespace allocator.
332 } // namespace base. 344 } // namespace base.
OLDNEW
« no previous file with comments | « base/allocator/allocator_shim.h ('k') | base/allocator/tcmalloc_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698