| 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 } | 334 } |
| 335 | 335 |
| 336 | 336 |
| 337 bool VirtualMemory::Uncommit(void* address, size_t size) { | 337 bool VirtualMemory::Uncommit(void* address, size_t size) { |
| 338 return mmap(address, size, PROT_NONE, | 338 return mmap(address, size, PROT_NONE, |
| 339 MAP_PRIVATE | MAP_ANON | MAP_NORESERVE | MAP_FIXED, | 339 MAP_PRIVATE | MAP_ANON | MAP_NORESERVE | MAP_FIXED, |
| 340 kMmapFd, kMmapFdOffset) != MAP_FAILED; | 340 kMmapFd, kMmapFdOffset) != MAP_FAILED; |
| 341 } | 341 } |
| 342 | 342 |
| 343 | 343 |
| 344 bool VirtualMemory::Reset(void* address, size_t size, bool is_executable) { |
| 345 return false; |
| 346 } |
| 347 |
| 348 |
| 344 class ThreadHandle::PlatformData : public Malloced { | 349 class ThreadHandle::PlatformData : public Malloced { |
| 345 public: | 350 public: |
| 346 explicit PlatformData(ThreadHandle::Kind kind) { | 351 explicit PlatformData(ThreadHandle::Kind kind) { |
| 347 Initialize(kind); | 352 Initialize(kind); |
| 348 } | 353 } |
| 349 | 354 |
| 350 void Initialize(ThreadHandle::Kind kind) { | 355 void Initialize(ThreadHandle::Kind kind) { |
| 351 switch (kind) { | 356 switch (kind) { |
| 352 case ThreadHandle::SELF: thread_ = pthread_self(); break; | 357 case ThreadHandle::SELF: thread_ = pthread_self(); break; |
| 353 case ThreadHandle::INVALID: thread_ = kNoThread; break; | 358 case ThreadHandle::INVALID: thread_ = kNoThread; break; |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 | 644 |
| 640 // Deallocate Mach port for thread. | 645 // Deallocate Mach port for thread. |
| 641 if (IsProfiling()) { | 646 if (IsProfiling()) { |
| 642 mach_port_deallocate(data_->task_self_, data_->profiled_thread_); | 647 mach_port_deallocate(data_->task_self_, data_->profiled_thread_); |
| 643 } | 648 } |
| 644 } | 649 } |
| 645 | 650 |
| 646 #endif // ENABLE_LOGGING_AND_PROFILING | 651 #endif // ENABLE_LOGGING_AND_PROFILING |
| 647 | 652 |
| 648 } } // namespace v8::internal | 653 } } // namespace v8::internal |
| OLD | NEW |