You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
645 B
22 lines
645 B
// Copyright 2016 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.
|
|
|
|
#include <lib/zx/vmar.h>
|
|
|
|
#include <zircon/syscalls.h>
|
|
|
|
namespace zx {
|
|
|
|
zx_status_t vmar::allocate2(uint32_t options, size_t offset, size_t size, vmar* child,
|
|
uintptr_t* child_addr) const {
|
|
// Allow for aliasing of |child| to the same container as |this|.
|
|
vmar h;
|
|
zx_status_t status =
|
|
zx_vmar_allocate(get(), options, offset, size, h.reset_and_get_address(), child_addr);
|
|
child->reset(h.release());
|
|
return status;
|
|
}
|
|
|
|
} // namespace zx
|