vm_memory/
mmap.rs

1// Copyright (C) 2019 Alibaba Cloud Computing. All rights reserved.
2//
3// Portions Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4//
5// Portions Copyright 2017 The Chromium OS Authors. All rights reserved.
6// Use of this source code is governed by a BSD-style license that can be
7// found in the LICENSE-BSD-3-Clause file.
8//
9// SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause
10
11//! The default implementation for the [`GuestMemory`](trait.GuestMemory.html) trait.
12//!
13//! This implementation is mmap-ing the memory of the guest into the current process.
14
15// re-export for backward compat, as the trait used to be defined in mmap.rs
16pub use vm_memory_new::bitmap::NewBitmap;
17
18#[cfg(all(not(feature = "xen"), target_family = "unix"))]
19pub use vm_memory_new::mmap::MmapRegionBuilder;
20
21#[cfg(all(feature = "xen", target_family = "unix"))]
22pub use vm_memory_new::mmap::{MmapRange, MmapXenFlags};
23
24pub use vm_memory_new::mmap::{
25    FromRangesError, GuestMemoryMmap, GuestRegionMmap, MmapRegion, MmapRegionError,
26};