chromium/base/memory/discardable_memory.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/memory/discardable_memory.h"

#include "base/feature_list.h"
#include "base/memory/discardable_memory_internal.h"
#include "base/memory/madv_free_discardable_memory_posix.h"
#include "base/metrics/field_trial_params.h"
#include "base/notreached.h"
#include "build/build_config.h"

#if BUILDFLAG(IS_ANDROID)
#include "third_party/ashmem/ashmem.h"
#endif  // BUILDFLAG(IS_ANDROID)

namespace base {

namespace features {
#if BUILDFLAG(IS_POSIX)
// Feature flag allowing the use of MADV_FREE discardable memory when there are
// multiple supported discardable memory backings.
BASE_FEATURE();
#endif  // BUILDFLAG(IS_POSIX)

#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
BASE_FEATURE();


#endif  // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) ||
        // BUILDFLAG(IS_CHROMEOS)

}  // namespace features

namespace {

#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)

DiscardableMemoryBacking GetBackingForFieldTrial() {}
#endif  // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) ||
        // BUILDFLAG(IS_CHROMEOS)

}  // namespace

#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)

// Probe capabilities of this device to determine whether we should participate
// in the discardable memory backing trial.
bool DiscardableMemoryBackingFieldTrialIsEnabled() {}

DiscardableMemoryTrialGroup GetDiscardableMemoryBackingFieldTrialGroup() {}
#endif  // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) ||
        // BUILDFLAG(IS_CHROMEOS)

DiscardableMemory::DiscardableMemory() = default;

DiscardableMemory::~DiscardableMemory() = default;

DiscardableMemoryBacking GetDiscardableMemoryBacking() {}

}  // namespace base