1*6777b538SAndroid Build Coastguard Worker // Copyright 2022 The Chromium Authors 2*6777b538SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be 3*6777b538SAndroid Build Coastguard Worker // found in the LICENSE file. 4*6777b538SAndroid Build Coastguard Worker 5*6777b538SAndroid Build Coastguard Worker #ifndef BASE_ALLOCATOR_DISPATCHER_CONFIGURATION_H_ 6*6777b538SAndroid Build Coastguard Worker #define BASE_ALLOCATOR_DISPATCHER_CONFIGURATION_H_ 7*6777b538SAndroid Build Coastguard Worker 8*6777b538SAndroid Build Coastguard Worker #include <cstddef> 9*6777b538SAndroid Build Coastguard Worker 10*6777b538SAndroid Build Coastguard Worker namespace base::allocator::dispatcher::configuration { 11*6777b538SAndroid Build Coastguard Worker 12*6777b538SAndroid Build Coastguard Worker // The maximum number of optional observers that may be present depending on 13*6777b538SAndroid Build Coastguard Worker // command line parameters. 14*6777b538SAndroid Build Coastguard Worker constexpr size_t kMaximumNumberOfOptionalObservers = 4; 15*6777b538SAndroid Build Coastguard Worker 16*6777b538SAndroid Build Coastguard Worker // The total number of observers including mandatory and optional observers. 17*6777b538SAndroid Build Coastguard Worker // Primarily the number of observers affects the performance at allocation time. 18*6777b538SAndroid Build Coastguard Worker // The current value of 4 doesn't have hard evidence. Keep in mind that 19*6777b538SAndroid Build Coastguard Worker // also a single observer can severely impact performance. 20*6777b538SAndroid Build Coastguard Worker constexpr size_t kMaximumNumberOfObservers = 4; 21*6777b538SAndroid Build Coastguard Worker 22*6777b538SAndroid Build Coastguard Worker } // namespace base::allocator::dispatcher::configuration 23*6777b538SAndroid Build Coastguard Worker 24*6777b538SAndroid Build Coastguard Worker #endif // BASE_ALLOCATOR_DISPATCHER_CONFIGURATION_H_