Commit b1c2af72 authored by Samuel Groß's avatar Samuel Groß Committed by V8 LUCI CQ

Implement OS::DecommitPages on Fuchsia

Bug: chromium:1218005
Change-Id: I00168c25921fd71d925c71c7b7b9ddafd392e95e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3205901Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77237}
parent 6fb24999
......@@ -134,8 +134,11 @@ bool OS::DiscardSystemPages(void* address, size_t size) {
}
bool OS::DecommitPages(void* address, size_t size) {
// TODO(chromium:1218005): support this.
return false;
// We rely on DiscardSystemPages decommitting the pages immediately (via
// ZX_VMO_OP_DECOMMIT) so that they are guaranteed to be zero-initialized
// should they be accessed again later on.
return SetPermissions(address, size, MemoryPermission::kNoAccess) &&
DiscardSystemPages(address, size);
}
// static
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment