blob: fa3d00ddf82ab3f7a704945a3c22c44a3274c946 [file] [log] [blame] [edit]
/*
* Copyright 2026 Google LLC.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "tools/partition_alloc/TestSupport.h"
#include <partition_alloc/buildflags.h>
#if PA_BUILDFLAG(USE_ALLOCATOR_SHIM)
#include <partition_alloc/shim/allocator_shim.h>
#include <partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h>
#endif
namespace skiatest {
void InitializePartitionAllocForTesting() {
#if PA_BUILDFLAG(USE_ALLOCATOR_SHIM)
allocator_shim::ConfigurePartitionsForTesting();
allocator_shim::internal::PartitionAllocMalloc::Allocator()->EnableThreadCacheIfSupported();
#endif
}
} // namespace skiatest