#include "base/allocator/partition_alloc_features.h"
#include "base/allocator/miracle_parameter.h"
#include "base/base_export.h"
#include "base/feature_list.h"
#include "base/features.h"
#include "base/metrics/field_trial_params.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "build/chromecast_buildflags.h"
#include "build/chromeos_buildflags.h"
#include "partition_alloc/buildflags.h"
#include "partition_alloc/partition_alloc_base/time/time.h"
#include "partition_alloc/partition_alloc_constants.h"
#include "partition_alloc/partition_root.h"
#include "partition_alloc/shim/allocator_shim_dispatch_to_noop_on_free.h"
#include "partition_alloc/thread_cache.h"
namespace base {
namespace features {
BASE_FEATURE(…);
constexpr FeatureParam<UnretainedDanglingPtrMode>::Option
kUnretainedDanglingPtrModeOption[] = …;
const base::FeatureParam<UnretainedDanglingPtrMode>
kUnretainedDanglingPtrModeParam = …;
BASE_FEATURE(…);
constexpr FeatureParam<DanglingPtrMode>::Option kDanglingPtrModeOption[] = …;
const base::FeatureParam<DanglingPtrMode> kDanglingPtrModeParam{ … };
constexpr FeatureParam<DanglingPtrType>::Option kDanglingPtrTypeOption[] = …;
const base::FeatureParam<DanglingPtrType> kDanglingPtrTypeParam{ … };
#if PA_BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
BASE_FEATURE(…);
MIRACLE_PARAMETER_FOR_INT(GetPartitionAllocLargeThreadCacheSizeValue,
kPartitionAllocLargeThreadCacheSize,
"PartitionAllocLargeThreadCacheSizeValue",
::partition_alloc::kThreadCacheLargeSizeThreshold)
MIRACLE_PARAMETER_FOR_INT(
GetPartitionAllocLargeThreadCacheSizeValueForLowRAMAndroid,
kPartitionAllocLargeThreadCacheSize,
"PartitionAllocLargeThreadCacheSizeValueForLowRAMAndroid",
::partition_alloc::kThreadCacheDefaultSizeThreshold)
BASE_FEATURE(…);
#endif
BASE_FEATURE(…);
const base::FeatureParam<int>
kPartitionAllocSchedulerLoopQuarantineBranchCapacity{ … };
BASE_FEATURE(…);
#endif
BASE_FEATURE(…);
constexpr FeatureParam<BackupRefPtrEnabledProcesses>::Option
kBackupRefPtrEnabledProcessesOptions[] = …;
const base::FeatureParam<BackupRefPtrEnabledProcesses>
kBackupRefPtrEnabledProcessesParam{ … };
constexpr FeatureParam<BackupRefPtrMode>::Option kBackupRefPtrModeOptions[] = …;
const base::FeatureParam<BackupRefPtrMode> kBackupRefPtrModeParam{ … };
BASE_FEATURE(…);
constexpr FeatureParam<MemtagMode>::Option kMemtagModeOptions[] = …;
const base::FeatureParam<MemtagMode> kMemtagModeParam{ … };
constexpr FeatureParam<RetagMode>::Option kRetagModeOptions[] = …;
const base::FeatureParam<RetagMode> kRetagModeParam{ … };
constexpr FeatureParam<MemoryTaggingEnabledProcesses>::Option
kMemoryTaggingEnabledProcessesOptions[] = …;
const base::FeatureParam<MemoryTaggingEnabledProcesses>
kMemoryTaggingEnabledProcessesParam{ … };
BASE_FEATURE(…);
BASE_EXPORT BASE_DECLARE_FEATURE(kPartitionAllocPermissiveMte);
BASE_FEATURE(…);
const base::FeatureParam<bool> kBackupRefPtrAsanEnableDereferenceCheckParam{ … };
const base::FeatureParam<bool> kBackupRefPtrAsanEnableExtractionCheckParam{ … };
const base::FeatureParam<bool> kBackupRefPtrAsanEnableInstantiationCheckParam{ … };
BASE_FEATURE(…);
const base::FeatureParam<BucketDistributionMode>::Option
kPartitionAllocBucketDistributionOption[] = …;
const base::FeatureParam<BucketDistributionMode>
kPartitionAllocBucketDistributionParam { … };
BASE_FEATURE(…);
const base::FeatureParam<TimeDelta> kPartitionAllocMemoryReclaimerInterval = …;
BASE_FEATURE(…);
BASE_FEATURE(…);
const base::FeatureParam<
partition_alloc::StraightenLargerSlotSpanFreeListsMode>::Option
kPartitionAllocStraightenLargerSlotSpanFreeListsModeOption[] = …;
const base::FeatureParam<partition_alloc::StraightenLargerSlotSpanFreeListsMode>
kPartitionAllocStraightenLargerSlotSpanFreeListsMode = …;
BASE_FEATURE(…);
BASE_FEATURE(…);
#if BUILDFLAG(IS_WIN)
BASE_FEATURE(kPageAllocatorRetryOnCommitFailure,
"PageAllocatorRetryOnCommitFailure",
FEATURE_DISABLED_BY_DEFAULT);
#endif
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS)
const FeatureParam<bool> kPartialLowEndModeExcludePartitionAllocSupport{
&kPartialLowEndModeOnMidRangeDevices, "exclude-partition-alloc-support",
false};
#endif
BASE_FEATURE(…);
MIRACLE_PARAMETER_FOR_DOUBLE(GetThreadCacheMultiplier,
kEnableConfigurableThreadCacheMultiplier,
"ThreadCacheMultiplier",
2.)
MIRACLE_PARAMETER_FOR_DOUBLE(GetThreadCacheMultiplierForAndroid,
kEnableConfigurableThreadCacheMultiplier,
"ThreadCacheMultiplierForAndroid",
1.)
constexpr partition_alloc::internal::base::TimeDelta ToPartitionAllocTimeDelta(
base::TimeDelta time_delta) { … }
constexpr base::TimeDelta FromPartitionAllocTimeDelta(
partition_alloc::internal::base::TimeDelta time_delta) { … }
BASE_FEATURE(…);
MIRACLE_PARAMETER_FOR_TIME_DELTA(
GetThreadCacheMinPurgeIntervalValue,
kEnableConfigurableThreadCachePurgeInterval,
"ThreadCacheMinPurgeInterval",
FromPartitionAllocTimeDelta(partition_alloc::kMinPurgeInterval))
MIRACLE_PARAMETER_FOR_TIME_DELTA(
GetThreadCacheMaxPurgeIntervalValue,
kEnableConfigurableThreadCachePurgeInterval,
"ThreadCacheMaxPurgeInterval",
FromPartitionAllocTimeDelta(partition_alloc::kMaxPurgeInterval))
MIRACLE_PARAMETER_FOR_TIME_DELTA(
GetThreadCacheDefaultPurgeIntervalValue,
kEnableConfigurableThreadCachePurgeInterval,
"ThreadCacheDefaultPurgeInterval",
FromPartitionAllocTimeDelta(partition_alloc::kDefaultPurgeInterval))
const partition_alloc::internal::base::TimeDelta
GetThreadCacheMinPurgeInterval() { … }
const partition_alloc::internal::base::TimeDelta
GetThreadCacheMaxPurgeInterval() { … }
const partition_alloc::internal::base::TimeDelta
GetThreadCacheDefaultPurgeInterval() { … }
BASE_FEATURE(…);
MIRACLE_PARAMETER_FOR_INT(
GetThreadCacheMinCachedMemoryForPurgingBytes,
kEnableConfigurableThreadCacheMinCachedMemoryForPurging,
"ThreadCacheMinCachedMemoryForPurgingBytes",
partition_alloc::kMinCachedMemoryForPurgingBytes)
BASE_FEATURE(…);
#if PA_BUILDFLAG(USE_FREELIST_DISPATCHER)
BASE_FEATURE(…);
#endif
BASE_FEATURE(…);
constexpr FeatureParam<WhenFreeBecomesNoOp>::Option
kPartitionAllocMakeFreeNoOpOnShutdownOptions[] = …;
const base::FeatureParam<WhenFreeBecomesNoOp>
kPartitionAllocMakeFreeNoOpOnShutdownParam{ … };
void MakeFreeNoOp(WhenFreeBecomesNoOp callsite) { … }
BASE_FEATURE(…);
#endif
BASE_FEATURE(…);
}
}