Chromium Code Reviews

Unified Diff: src/store-buffer.cc

Issue 23641009: Refactor and cleanup VirtualMemory. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove useless test case. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/store-buffer.cc
diff --git a/src/store-buffer.cc b/src/store-buffer.cc
index 30b7f25b6604591d72c9cca07838967cc3f500c5..319a45944305980db8748981e9833c6ba86fa50c 100644
--- a/src/store-buffer.cc
+++ b/src/store-buffer.cc
@@ -72,7 +72,8 @@ void StoreBuffer::SetUp() {
// Don't know the alignment requirements of the OS, but it is certainly not
// less than 0xfff.
ASSERT((reinterpret_cast<uintptr_t>(old_start_) & 0xfff) == 0);
- int initial_length = static_cast<int>(OS::CommitPageSize() / kPointerSize);
+ int initial_length =
+ static_cast<int>(VirtualMemory::GetPageSize() / kPointerSize);
ASSERT(initial_length > 0);
ASSERT(initial_length <= kOldStoreBufferLength);
old_limit_ = old_start_ + initial_length;
@@ -81,7 +82,7 @@ void StoreBuffer::SetUp() {
CHECK(old_virtual_memory_->Commit(
reinterpret_cast<void*>(old_start_),
(old_limit_ - old_start_) * kPointerSize,
- false));
+ VirtualMemory::NOT_EXECUTABLE));
ASSERT(reinterpret_cast<Address>(start_) >= virtual_memory_->address());
ASSERT(reinterpret_cast<Address>(limit_) >= virtual_memory_->address());
@@ -97,7 +98,7 @@ void StoreBuffer::SetUp() {
CHECK(virtual_memory_->Commit(reinterpret_cast<Address>(start_),
kStoreBufferSize,
- false)); // Not executable.
+ VirtualMemory::NOT_EXECUTABLE));
heap_->public_set_store_buffer_top(start_);
hash_set_1_ = new uintptr_t[kHashSetLength];
@@ -154,7 +155,7 @@ void StoreBuffer::EnsureSpace(intptr_t space_needed) {
size_t grow = old_limit_ - old_start_; // Double size.
CHECK(old_virtual_memory_->Commit(reinterpret_cast<void*>(old_limit_),
grow * kPointerSize,
- false));
+ VirtualMemory::NOT_EXECUTABLE));
old_limit_ += grow;
}
« src/platform/virtual-memory.cc ('K') | « src/spaces-inl.h ('k') | src/v8globals.h » ('j') | no next file with comments »

Powered by Google App Engine