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

Side by Side Diff: runtime/vm/virtual_memory.h

Issue 138913016: Fix flag to switch write protection of code pages on/off. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed test to match expectation Created 6 years, 10 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 | « runtime/vm/object_test.cc ('k') | runtime/vm/virtual_memory_android.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 (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 #ifndef VM_VIRTUAL_MEMORY_H_ 5 #ifndef VM_VIRTUAL_MEMORY_H_
6 #define VM_VIRTUAL_MEMORY_H_ 6 #define VM_VIRTUAL_MEMORY_H_
7 7
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/memory_region.h" 10 #include "vm/memory_region.h"
11 11
12 namespace dart { 12 namespace dart {
13 13
14 class VirtualMemory { 14 class VirtualMemory {
15 public: 15 public:
16 // Read-write-execute is not available because it is never used.
17 enum Protection { 16 enum Protection {
18 kNoAccess, 17 kNoAccess,
19 kReadOnly, 18 kReadOnly,
20 kReadWrite, 19 kReadWrite,
21 kReadExecute, 20 kReadExecute,
21 kReadWriteExecute
22 }; 22 };
23 23
24 // The reserved memory is unmapped on destruction. 24 // The reserved memory is unmapped on destruction.
25 ~VirtualMemory(); 25 ~VirtualMemory();
26 26
27 uword start() const { return region_.start(); } 27 uword start() const { return region_.start(); }
28 uword end() const { return region_.end(); } 28 uword end() const { return region_.end(); }
29 void* address() const { return region_.pointer(); } 29 void* address() const { return region_.pointer(); }
30 intptr_t size() const { return region_.size(); } 30 intptr_t size() const { return region_.size(); }
31 31
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 void* reserved_pointer_; 90 void* reserved_pointer_;
91 91
92 static uword page_size_; 92 static uword page_size_;
93 93
94 DISALLOW_IMPLICIT_CONSTRUCTORS(VirtualMemory); 94 DISALLOW_IMPLICIT_CONSTRUCTORS(VirtualMemory);
95 }; 95 };
96 96
97 } // namespace dart 97 } // namespace dart
98 98
99 #endif // VM_VIRTUAL_MEMORY_H_ 99 #endif // VM_VIRTUAL_MEMORY_H_
OLDNEW
« no previous file with comments | « runtime/vm/object_test.cc ('k') | runtime/vm/virtual_memory_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698