Commit 2314928b authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[cleanup] Remove dead {AllocatePage} function

R=mlippautz@chromium.org

Bug: v8:9396
Change-Id: If197687b6208257be18f91b4b172ec41600c21b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1784287Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63555}
parent eb443e1f
......@@ -197,16 +197,6 @@ bool SetPermissions(v8::PageAllocator* page_allocator, void* address,
return page_allocator->SetPermissions(address, size, access);
}
byte* AllocatePage(v8::PageAllocator* page_allocator, void* hint,
size_t* allocated) {
DCHECK_NOT_NULL(page_allocator);
size_t page_size = page_allocator->AllocatePageSize();
void* result = AllocatePages(page_allocator, hint, page_size, page_size,
PageAllocator::kReadWrite);
if (result != nullptr) *allocated = page_size;
return static_cast<byte*>(result);
}
bool OnCriticalMemoryPressure(size_t length) {
// TODO(bbudge) Rework retry logic once embedders implement the more
// informative overload.
......
......@@ -89,7 +89,7 @@ V8_EXPORT_PRIVATE v8::PageAllocator* SetPlatformPageAllocatorForTesting(
v8::PageAllocator* page_allocator);
// Gets the page granularity for AllocatePages and FreePages. Addresses returned
// by AllocatePages and AllocatePage are aligned to this size.
// by AllocatePages are aligned to this size.
V8_EXPORT_PRIVATE size_t AllocatePageSize();
// Gets the granularity at which the permissions and release calls can be made.
......@@ -142,13 +142,6 @@ inline bool SetPermissions(v8::PageAllocator* page_allocator, Address address,
access);
}
// Convenience function that allocates a single system page with read and write
// permissions. |address| is a hint. Returns the base address of the memory and
// the page size via |allocated| on success. Returns nullptr on failure.
V8_EXPORT_PRIVATE
V8_WARN_UNUSED_RESULT byte* AllocatePage(v8::PageAllocator* page_allocator,
void* address, size_t* allocated);
// Function that may release reserved memory regions to allow failed allocations
// to succeed. |length| is the amount of memory needed. Returns |true| if memory
// could be released, false otherwise.
......
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