blob: 12a21c457a62a5416c2098bc3f3fa5bea6b6e896 [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.mem;
using zx;
/// A range of bytes within a VMO.
type Range = resource struct {
/// The vmo that contains the bytes.
vmo zx.handle:VMO;
/// The offset of the first byte within the range relative to the start of
/// the VMO.
///
/// For example, if `offset` is zero, then the first byte in the range is
/// the first byte in the VMO.
offset uint64;
/// The number of bytes in the range.
///
/// For example, if the offset is 3 and the size is 2, and the VMO starts
/// with "abcdefg...", then the range contains "de".
///
/// The sum of the offset and the size must not be greater than the
/// physical size of the VMO.
size uint64;
};