OLD | NEW |
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 "vm/globals.h" |
| 6 #if defined(TARGET_OS_WINDOWS) |
| 7 |
5 #include "vm/virtual_memory.h" | 8 #include "vm/virtual_memory.h" |
6 | 9 |
7 #include "platform/assert.h" | 10 #include "platform/assert.h" |
8 | 11 |
9 namespace dart { | 12 namespace dart { |
10 | 13 |
11 uword VirtualMemory::page_size_ = 0; | 14 uword VirtualMemory::page_size_ = 0; |
12 | 15 |
13 | 16 |
14 void VirtualMemory::InitOnce() { | 17 void VirtualMemory::InitOnce() { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 break; | 80 break; |
78 case kReadWriteExecute: | 81 case kReadWriteExecute: |
79 prot = PAGE_EXECUTE_READWRITE; | 82 prot = PAGE_EXECUTE_READWRITE; |
80 break; | 83 break; |
81 } | 84 } |
82 DWORD old_prot = 0; | 85 DWORD old_prot = 0; |
83 return VirtualProtect(address(), size(), prot, &old_prot); | 86 return VirtualProtect(address(), size(), prot, &old_prot); |
84 } | 87 } |
85 | 88 |
86 } // namespace dart | 89 } // namespace dart |
| 90 |
| 91 #endif // defined(TARGET_OS_WINDOWS) |
OLD | NEW |