1 // Copyright 2022 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_CONFIGURATION_H_ 6 #define BASE_ALLOCATOR_DISPATCHER_CONFIGURATION_H_ 7 8 #include <cstddef> 9 10 namespace base::allocator::dispatcher::configuration { 11 12 // The maximum number of optional observers that may be present depending on 13 // command line parameters. 14 constexpr size_t kMaximumNumberOfOptionalObservers = 4; 15 16 // The total number of observers including mandatory and optional observers. 17 // Primarily the number of observers affects the performance at allocation time. 18 // The current value of 4 doesn't have hard evidence. Keep in mind that 19 // also a single observer can severely impact performance. 20 constexpr size_t kMaximumNumberOfObservers = 4; 21 22 } // namespace base::allocator::dispatcher::configuration 23 24 #endif // BASE_ALLOCATOR_DISPATCHER_CONFIGURATION_H_