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

Side by Side Diff: runtime/vm/virtual_memory_test.cc

Issue 644453003: Simplify VirtualMemory by removing unused ReserveAligned method. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/unit_test.h" 6 #include "vm/unit_test.h"
7 #include "vm/virtual_memory.h" 7 #include "vm/virtual_memory.h"
8 8
9 namespace dart { 9 namespace dart {
10 10
(...skipping 19 matching lines...) Expand all
30 char* buf = reinterpret_cast<char*>(vm->address()); 30 char* buf = reinterpret_cast<char*>(vm->address());
31 buf[0] = 'a'; 31 buf[0] = 'a';
32 buf[1] = 'c'; 32 buf[1] = 'c';
33 buf[2] = '/'; 33 buf[2] = '/';
34 buf[3] = 'd'; 34 buf[3] = 'd';
35 buf[4] = 'c'; 35 buf[4] = 'c';
36 buf[5] = 0; 36 buf[5] = 0;
37 EXPECT_STREQ("ac/dc", buf); 37 EXPECT_STREQ("ac/dc", buf);
38 38
39 delete vm; 39 delete vm;
40
41 const intptr_t kAlignment = 1 * MB;
42 vm = VirtualMemory::ReserveAligned(kVirtualMemoryBlockSize, kAlignment);
43 ASSERT((vm->start() & (kAlignment - 1)) == 0);
44 delete vm;
45 } 40 }
46 41
47 } // namespace dart 42 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698