OLD | NEW |
1 // Copyright (c) 2014, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 #if defined(FLETCH_TARGET_OS_POSIX) | 5 #if defined(FLETCH_TARGET_OS_POSIX) |
6 | 6 |
7 // We do not include platform_posix.h on purpose. That file | 7 // We do not include platform_posix.h on purpose. That file |
8 // should never be directly inported. platform.h is always | 8 // should never be directly inported. platform.h is always |
9 // the platform header to include. | 9 // the platform header to include. |
10 #include "src/shared/platform.h" // NOLINT | 10 #include "src/shared/platform.h" // NOLINT |
11 | 11 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 237 |
238 bool VirtualMemory::Uncommit(uword address, int size) { | 238 bool VirtualMemory::Uncommit(uword address, int size) { |
239 return mmap(reinterpret_cast<void*>(address), size, PROT_NONE, | 239 return mmap(reinterpret_cast<void*>(address), size, PROT_NONE, |
240 MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, kMmapFd, | 240 MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, kMmapFd, |
241 kMmapFdOffset) != MAP_FAILED; | 241 kMmapFdOffset) != MAP_FAILED; |
242 } | 242 } |
243 | 243 |
244 } // namespace fletch | 244 } // namespace fletch |
245 | 245 |
246 #endif // defined(FLETCH_TARGET_OS_POSIX) | 246 #endif // defined(FLETCH_TARGET_OS_POSIX) |
OLD | NEW |