Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / base / allocator / allocator_shim.h
blobca70ab0e10fa64949b53c78b7f32d71a1fba1a81
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
3 // found in the LICENSE file.
5 #ifndef BASE_ALLOCATOR_ALLOCATOR_SHIM_H_
6 #define BASE_ALLOCATOR_ALLOCATOR_SHIM_H_
8 #include <stddef.h>
10 namespace base {
11 namespace allocator {
13 // Resets the environment variable CHROME_ALLOCATOR to specify the choice to
14 // be used by subprocesses. Priority is given to the current value of
15 // CHROME_ALLOCATOR_2 (if specified), then CHROME_ALLOCATOR (if specified), and
16 // then a default value (typically set to TCMALLOC).
17 void SetupSubprocessAllocator();
19 // Expose some of tcmalloc functions for test.
20 void* TCMallocDoMallocForTest(size_t size);
21 void TCMallocDoFreeForTest(void* ptr);
22 size_t ExcludeSpaceForMarkForTest(size_t size);
24 } // namespace allocator.
25 } // namespace base.
27 #endif // BASE_ALLOCATOR_ALLOCATOR_SHIM_H_