summaryrefslogtreecommitdiff
path: root/chromium/base/allocator/dispatcher/configuration.h
blob: 34c37911dbf4cafc5a66973ea282659cdda3ba12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef BASE_ALLOCATOR_DISPATCHER_CONFIGURATION_H_
#define BASE_ALLOCATOR_DISPATCHER_CONFIGURATION_H_

#include <cstddef>

namespace base::allocator::dispatcher::configuration {

// The maximum number of optional observers that may be present depending on
// command line parameters.
constexpr size_t kMaximumNumberOfOptionalObservers = 4;

// The total number of observers including mandatory and optional observers.
// Primarily the number of observers affects the performance at allocation time.
// The current value of 4 doesn't have hard evidence. Keep in mind that
// also a single observer can severely impact performance.
constexpr size_t kMaximumNumberOfObservers = 4;

}  // namespace base::allocator::dispatcher::configuration

#endif  // BASE_ALLOCATOR_DISPATCHER_CONFIGURATION_H_