1 // Copyright 2023 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef BASE_ALLOCATOR_DISPATCHER_STANDARD_HOOKS_H_ 6 #define BASE_ALLOCATOR_DISPATCHER_STANDARD_HOOKS_H_ 7 8 // This file and its cc file contain the standard allocation hooks and auxiliary 9 // functions. These are intended to be replaced by the new dispatcher mechanism 10 // in /base/allocator/dispatcher. 11 12 #include "base/allocator/buildflags.h" 13 #include "base/base_export.h" 14 15 namespace base::allocator::dispatcher { 16 17 #if !BUILDFLAG(USE_ALLOCATION_EVENT_DISPATCHER) 18 // Install the standard allocation hooks which forward allocation events to the 19 // PoissonAllocationSampler. 20 void BASE_EXPORT InstallStandardAllocatorHooks(); 21 #endif 22 23 } // namespace base::allocator::dispatcher 24 25 #endif // BASE_ALLOCATOR_DISPATCHER_STANDARD_HOOKS_H_ 26