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

Side by Side Diff: test/cctest/test-platform-linux.cc

Issue 6685088: Merge isolates to bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | test/cctest/test-platform-win32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // 2 //
3 // Tests of the TokenLock class from lock.h 3 // Tests of the TokenLock class from lock.h
4 4
5 #include <pthread.h> 5 #include <pthread.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <unistd.h> // for usleep() 7 #include <unistd.h> // for usleep()
8 8
9 #include "v8.h" 9 #include "v8.h"
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 &RunTestBusyLock, 60 &RunTestBusyLock,
61 mutex); 61 mutex);
62 CHECK_EQ(0, thread_created); 62 CHECK_EQ(0, thread_created);
63 LoopIncrement(mutex, 1); 63 LoopIncrement(mutex, 1);
64 pthread_join(other, NULL); 64 pthread_join(other, NULL);
65 delete mutex; 65 delete mutex;
66 } 66 }
67 67
68 68
69 TEST(VirtualMemory) { 69 TEST(VirtualMemory) {
70 OS::Setup();
70 VirtualMemory* vm = new VirtualMemory(1 * MB); 71 VirtualMemory* vm = new VirtualMemory(1 * MB);
71 CHECK(vm->IsReserved()); 72 CHECK(vm->IsReserved());
72 void* block_addr = vm->address(); 73 void* block_addr = vm->address();
73 size_t block_size = 4 * KB; 74 size_t block_size = 4 * KB;
74 CHECK(vm->Commit(block_addr, block_size, false)); 75 CHECK(vm->Commit(block_addr, block_size, false));
75 // Check whether we can write to memory. 76 // Check whether we can write to memory.
76 int* addr = static_cast<int*>(block_addr); 77 int* addr = static_cast<int*>(block_addr);
77 addr[KB-1] = 2; 78 addr[KB-1] = 2;
78 CHECK(vm->Uncommit(block_addr, block_size)); 79 CHECK(vm->Uncommit(block_addr, block_size));
79 delete vm; 80 delete vm;
80 } 81 }
OLDNEW
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | test/cctest/test-platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698