| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Platform-specific code for QNX goes here. For the POSIX-compatible | 5 // Platform-specific code for QNX goes here. For the POSIX-compatible |
| 6 // parts the implementation is in platform-posix.cc. | 6 // parts the implementation is in platform-posix.cc. |
| 7 | 7 |
| 8 #include <backtrace.h> | 8 #include <backtrace.h> |
| 9 #include <pthread.h> | 9 #include <pthread.h> |
| 10 #include <semaphore.h> | 10 #include <semaphore.h> |
| 11 #include <signal.h> | 11 #include <signal.h> |
| 12 #include <stdlib.h> | 12 #include <stdlib.h> |
| 13 #include <sys/resource.h> | 13 #include <sys/resource.h> |
| 14 #include <sys/time.h> | 14 #include <sys/time.h> |
| 15 #include <sys/types.h> | 15 #include <sys/types.h> |
| 16 #include <ucontext.h> | 16 #include <ucontext.h> |
| 17 | 17 |
| 18 // QNX requires memory pages to be marked as executable. | 18 // QNX requires memory pages to be marked as executable. |
| 19 // Otherwise, the OS raises an exception when executing code in that page. | 19 // Otherwise, the OS raises an exception when executing code in that page. |
| 20 #include <errno.h> | 20 #include <errno.h> |
| 21 #include <fcntl.h> // open | 21 #include <fcntl.h> // open |
| 22 #include <stdarg.h> | 22 #include <stdarg.h> |
| 23 #include <strings.h> // index | 23 #include <strings.h> // index |
| 24 #include <sys/mman.h> // mmap & munmap | 24 #include <sys/mman.h> // mmap & munmap |
| 25 #include <sys/procfs.h> | 25 #include <sys/procfs.h> |
| 26 #include <sys/stat.h> // open | 26 #include <sys/stat.h> // open |
| 27 #include <sys/types.h> // mmap & munmap | |
| 28 #include <unistd.h> // sysconf | 27 #include <unistd.h> // sysconf |
| 29 | 28 |
| 30 #include <cmath> | 29 #include <cmath> |
| 31 | 30 |
| 32 #undef MAP_TYPE | 31 #undef MAP_TYPE |
| 33 | 32 |
| 34 #include "src/base/macros.h" | 33 #include "src/base/macros.h" |
| 35 #include "src/base/platform/platform.h" | 34 #include "src/base/platform/platform.h" |
| 36 | 35 |
| 37 | 36 |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { | 306 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { |
| 308 return munmap(base, size) == 0; | 307 return munmap(base, size) == 0; |
| 309 } | 308 } |
| 310 | 309 |
| 311 | 310 |
| 312 bool VirtualMemory::HasLazyCommits() { | 311 bool VirtualMemory::HasLazyCommits() { |
| 313 return false; | 312 return false; |
| 314 } | 313 } |
| 315 | 314 |
| 316 } } // namespace v8::base | 315 } } // namespace v8::base |
| OLD | NEW |