Avi Drissman | e4622aa | 2022-09-08 20:36:06 | [diff] [blame] | 1 | // Copyright 2022 The Chromium Authors |
André Kempe | 0e4df75 | 2022-08-05 09:36:57 | [diff] [blame] | 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 | |
Peter Kasting | 134ef9af | 2024-12-28 02:30:09 | [diff] [blame] | 24 | #endif // BASE_ALLOCATOR_DISPATCHER_CONFIGURATION_H_ |