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_SUBSYSTEM_H_ 6 #define BASE_ALLOCATOR_DISPATCHER_SUBSYSTEM_H_ 7 8 namespace base::allocator::dispatcher { 9 10 // Identifiers for the memory subsystem handling the allocation. Some observers 11 // require more detailed information on who is performing the allocation, i.e. 12 // SamplingHeapProfiler. 13 enum class AllocationSubsystem { 14 // Allocation is handled by PartitionAllocator. 15 kPartitionAllocator = 1, 16 // Allocation is handled by AllocatorShims. 17 kAllocatorShim = 2, 18 // Represents a simulated allocation event during testing and is used to 19 // filter out these allocations from real ones. 20 // 21 // Included for backward compatibility, this value becomes obsolete once the 22 // old allocation hooks are removed from PoissonAllocationSampler. 23 kManualForTesting = 3, 24 }; 25 } // namespace base::allocator::dispatcher 26 27 #endif // BASE_ALLOCATOR_DISPATCHER_SUBSYSTEM_H_