Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Unified Diff: test/cctest/test-platform-linux.cc

Issue 23970004: Revert r16648, r16641, r16638 and r16637. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-macro-assembler-x64.cc ('k') | test/cctest/test-platform-win32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-platform-linux.cc
diff --git a/test/cctest/test-platform-linux.cc b/test/cctest/test-platform-linux.cc
index e0eae026cc7171c696586b27884890fe53a5077e..f289e948284cc1ec2f2e170b70c4063b289177c5 100644
--- a/test/cctest/test-platform-linux.cc
+++ b/test/cctest/test-platform-linux.cc
@@ -39,6 +39,20 @@
using namespace ::v8::internal;
+TEST(VirtualMemory) {
+ VirtualMemory* vm = new VirtualMemory(1 * MB);
+ CHECK(vm->IsReserved());
+ void* block_addr = vm->address();
+ size_t block_size = 4 * KB;
+ CHECK(vm->Commit(block_addr, block_size, false));
+ // Check whether we can write to memory.
+ int* addr = static_cast<int*>(block_addr);
+ addr[KB-1] = 2;
+ CHECK(vm->Uncommit(block_addr, block_size));
+ delete vm;
+}
+
+
TEST(GetCurrentProcessId) {
CHECK_EQ(static_cast<int>(getpid()), OS::GetCurrentProcessId());
}
« no previous file with comments | « test/cctest/test-macro-assembler-x64.cc ('k') | test/cctest/test-platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698