1 // Copyright 2024 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 PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_DISPATCH_TO_NOOP_ON_FREE_H_
6 #define PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_DISPATCH_TO_NOOP_ON_FREE_H_
7 
8 #include "partition_alloc/partition_alloc_base/component_export.h"
9 
10 namespace allocator_shim {
11 // Places an allocator shim layer at the front of the chain during shutdown.
12 // This new layer replaces free() with a no-op implementation
13 // in order to prevent shutdown hangs.
14 PA_COMPONENT_EXPORT(ALLOCATOR_SHIM)
15 void InsertNoOpOnFreeAllocatorShimOnShutDown();
16 }  // namespace allocator_shim
17 
18 #endif  // PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_DISPATCH_TO_NOOP_ON_FREE_H_
19