Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(517)

Unified Diff: runtime/vm/virtual_memory_fuchsia.cc

Issue 2583543004: Fuchsia: Switch to new virtual memory syscalls (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/virtual_memory_fuchsia.cc
diff --git a/runtime/vm/virtual_memory_fuchsia.cc b/runtime/vm/virtual_memory_fuchsia.cc
index bd78bf98d6f42b6a5e0eb5698a7eaa4a4118a807..bfbac54b2b2738181611f6e3d25fb0bb19660868 100644
--- a/runtime/vm/virtual_memory_fuchsia.cc
+++ b/runtime/vm/virtual_memory_fuchsia.cc
@@ -37,7 +37,7 @@ VirtualMemory* VirtualMemory::ReserveInternal(intptr_t size) {
const int prot =
MX_VM_FLAG_PERM_READ | MX_VM_FLAG_PERM_WRITE | MX_VM_FLAG_PERM_EXECUTE;
uintptr_t addr;
- status = mx_process_map_vm(mx_process_self(), vmo, 0, size, &addr, prot);
+ status = mx_vmar_map(mx_vmar_root_self(), 0, vmo, 0, size, prot, &addr);
if (status != NO_ERROR) {
mx_handle_close(vmo);
FATAL("VirtualMemory::ReserveInternal FAILED");
@@ -55,7 +55,7 @@ VirtualMemory::~VirtualMemory() {
// Issue MG-162.
uintptr_t addr = reinterpret_cast<uintptr_t>(address());
mx_status_t status =
- mx_process_unmap_vm(mx_process_self(), addr, 0 /*reserved_size_*/);
+ mx_vmar_unmap(mx_vmar_root_self(), addr, 0 /*reserved_size_*/);
if (status != NO_ERROR) {
FATAL("VirtualMemory::~VirtualMemory: unamp FAILED");
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698