Commit 11555991 authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Fix some nits in partition_allocator.

Change-Id: Id53aa30f876c5be1f770f22cfca375bbb74fea2b
Reviewed-on: https://chromium-review.googlesource.com/c/1284209Reviewed-by: default avatarChris Palmer <palmer@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600164}
parent c6661cc4
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
#include "base/allocator/partition_allocator/oom_callback.h" #include "base/allocator/partition_allocator/oom_callback.h"
#include "base/logging.h" #include "base/logging.h"
namespace base { namespace base {
......
...@@ -69,12 +69,10 @@ bool SetSystemPagesAccessInternal( ...@@ -69,12 +69,10 @@ bool SetSystemPagesAccessInternal(
void* address, void* address,
size_t length, size_t length,
PageAccessibilityConfiguration accessibility) { PageAccessibilityConfiguration accessibility) {
if (accessibility == PageInaccessible) { if (accessibility == PageInaccessible)
return VirtualFree(address, length, MEM_DECOMMIT) != 0; return VirtualFree(address, length, MEM_DECOMMIT) != 0;
} else { return nullptr != VirtualAlloc(address, length, MEM_COMMIT,
return nullptr != VirtualAlloc(address, length, MEM_COMMIT, GetAccessFlags(accessibility));
GetAccessFlags(accessibility));
}
} }
void FreePagesInternal(void* address, size_t length) { void FreePagesInternal(void* address, size_t length) {
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
#include "base/allocator/partition_allocator/spin_lock.h" #include "base/allocator/partition_allocator/spin_lock.h"
#include "base/threading/platform_thread.h" #include "base/threading/platform_thread.h"
#include "build/build_config.h" #include "build/build_config.h"
......
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