Commit 1dac4dbd authored by Karl Schimpf's avatar Karl Schimpf Committed by Commit Bot

Allow ReserveRegion of ArrayBufferContents only reserve on windows

Modify ArrayBufferContents::ReserveRegion() to only reserve memory on
both posix and windows. Previous code would only reserve on posix, and
would do both reserve and commit on windows.

Bug: v8:6743
Change-Id: If61e3ecc5edb7082ca13845121bba4c602e537c7
Reviewed-on: https://chromium-review.googlesource.com/682759Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504423}
parent 31314140
......@@ -150,10 +150,8 @@ void* ArrayBufferContents::ReserveMemory(size_t size) {
}
#endif
// TODO(crbug.com/735209): On Windows this commits all the memory, rather than
// just reserving it. This is very bad and should be fixed, but we don't use
// this feature on Windows at all yet.
return base::AllocPages(hint, size, align, base::PageInaccessible);
constexpr bool commit = true;
return base::AllocPages(hint, size, align, base::PageInaccessible, !commit);
}
void ArrayBufferContents::FreeMemory(void* data) {
......
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