OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include <errno.h> | 44 #include <errno.h> |
45 #include <ieeefp.h> // finite() | 45 #include <ieeefp.h> // finite() |
46 #include <signal.h> // sigemptyset(), etc | 46 #include <signal.h> // sigemptyset(), etc |
47 #include <sys/regset.h> | 47 #include <sys/regset.h> |
48 | 48 |
49 | 49 |
50 #undef MAP_TYPE | 50 #undef MAP_TYPE |
51 | 51 |
52 #include "v8.h" | 52 #include "v8.h" |
53 | 53 |
54 #include "platform-posix.h" | |
55 #include "platform.h" | 54 #include "platform.h" |
56 #include "v8threads.h" | 55 #include "v8threads.h" |
57 #include "vm-state-inl.h" | 56 #include "vm-state-inl.h" |
58 | 57 |
59 | 58 |
60 // It seems there is a bug in some Solaris distributions (experienced in | 59 // It seems there is a bug in some Solaris distributions (experienced in |
61 // SunOS 5.10 Generic_141445-09) which make it difficult or impossible to | 60 // SunOS 5.10 Generic_141445-09) which make it difficult or impossible to |
62 // access signbit() despite the availability of other C99 math functions. | 61 // access signbit() despite the availability of other C99 math functions. |
63 #ifndef signbit | 62 #ifndef signbit |
64 namespace std { | 63 namespace std { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 104 |
106 if (mbase == MAP_FAILED) { | 105 if (mbase == MAP_FAILED) { |
107 LOG(Isolate::Current(), StringEvent("OS::Allocate", "mmap failed")); | 106 LOG(Isolate::Current(), StringEvent("OS::Allocate", "mmap failed")); |
108 return NULL; | 107 return NULL; |
109 } | 108 } |
110 *allocated = msize; | 109 *allocated = msize; |
111 return mbase; | 110 return mbase; |
112 } | 111 } |
113 | 112 |
114 | 113 |
115 void OS::DumpBacktrace() { | |
116 // Currently unsupported. | |
117 } | |
118 | |
119 | |
120 class PosixMemoryMappedFile : public OS::MemoryMappedFile { | 114 class PosixMemoryMappedFile : public OS::MemoryMappedFile { |
121 public: | 115 public: |
122 PosixMemoryMappedFile(FILE* file, void* memory, int size) | 116 PosixMemoryMappedFile(FILE* file, void* memory, int size) |
123 : file_(file), memory_(memory), size_(size) { } | 117 : file_(file), memory_(memory), size_(size) { } |
124 virtual ~PosixMemoryMappedFile(); | 118 virtual ~PosixMemoryMappedFile(); |
125 virtual void* memory() { return memory_; } | 119 virtual void* memory() { return memory_; } |
126 virtual int size() { return size_; } | 120 virtual int size() { return size_; } |
127 private: | 121 private: |
128 FILE* file_; | 122 FILE* file_; |
129 void* memory_; | 123 void* memory_; |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 return munmap(base, size) == 0; | 335 return munmap(base, size) == 0; |
342 } | 336 } |
343 | 337 |
344 | 338 |
345 bool VirtualMemory::HasLazyCommits() { | 339 bool VirtualMemory::HasLazyCommits() { |
346 // TODO(alph): implement for the platform. | 340 // TODO(alph): implement for the platform. |
347 return false; | 341 return false; |
348 } | 342 } |
349 | 343 |
350 } } // namespace v8::internal | 344 } } // namespace v8::internal |
OLD | NEW |