OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 | 163 |
164 void OS::Free(void* address, const size_t size) { | 164 void OS::Free(void* address, const size_t size) { |
165 // TODO(1240712): munmap has a return value which is ignored here. | 165 // TODO(1240712): munmap has a return value which is ignored here. |
166 int result = munmap(address, size); | 166 int result = munmap(address, size); |
167 USE(result); | 167 USE(result); |
168 ASSERT(result == 0); | 168 ASSERT(result == 0); |
169 } | 169 } |
170 | 170 |
171 | 171 |
172 #ifdef ENABLE_HEAP_PROTECTION | |
173 | |
174 void OS::Protect(void* address, size_t size) { | |
175 UNIMPLEMENTED(); | |
176 } | |
177 | |
178 | |
179 void OS::Unprotect(void* address, size_t size, bool is_executable) { | |
180 UNIMPLEMENTED(); | |
181 } | |
182 | |
183 #endif | |
184 | |
185 | |
186 void OS::Sleep(int milliseconds) { | 172 void OS::Sleep(int milliseconds) { |
187 usleep(1000 * milliseconds); | 173 usleep(1000 * milliseconds); |
188 } | 174 } |
189 | 175 |
190 | 176 |
191 void OS::Abort() { | 177 void OS::Abort() { |
192 // Redirect to std abort to signal abnormal program termination | 178 // Redirect to std abort to signal abnormal program termination |
193 abort(); | 179 abort(); |
194 } | 180 } |
195 | 181 |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 | 803 |
818 void Sampler::Stop() { | 804 void Sampler::Stop() { |
819 ASSERT(IsActive()); | 805 ASSERT(IsActive()); |
820 SamplerThread::RemoveActiveSampler(this); | 806 SamplerThread::RemoveActiveSampler(this); |
821 SetActive(false); | 807 SetActive(false); |
822 } | 808 } |
823 | 809 |
824 #endif // ENABLE_LOGGING_AND_PROFILING | 810 #endif // ENABLE_LOGGING_AND_PROFILING |
825 | 811 |
826 } } // namespace v8::internal | 812 } } // namespace v8::internal |
OLD | NEW |