| 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 } | 339 } |
| 340 | 340 |
| 341 | 341 |
| 342 bool VirtualMemory::Uncommit(void* address, size_t size) { | 342 bool VirtualMemory::Uncommit(void* address, size_t size) { |
| 343 return mmap(address, size, PROT_NONE, | 343 return mmap(address, size, PROT_NONE, |
| 344 MAP_PRIVATE | MAP_ANON | MAP_NORESERVE | MAP_FIXED, | 344 MAP_PRIVATE | MAP_ANON | MAP_NORESERVE | MAP_FIXED, |
| 345 kMmapFd, kMmapFdOffset) != MAP_FAILED; | 345 kMmapFd, kMmapFdOffset) != MAP_FAILED; |
| 346 } | 346 } |
| 347 | 347 |
| 348 | 348 |
| 349 bool VirtualMemory::Reset(void* address, size_t size, bool is_executable) { |
| 350 return false; |
| 351 } |
| 352 |
| 353 |
| 349 class ThreadHandle::PlatformData : public Malloced { | 354 class ThreadHandle::PlatformData : public Malloced { |
| 350 public: | 355 public: |
| 351 explicit PlatformData(ThreadHandle::Kind kind) { | 356 explicit PlatformData(ThreadHandle::Kind kind) { |
| 352 Initialize(kind); | 357 Initialize(kind); |
| 353 } | 358 } |
| 354 | 359 |
| 355 void Initialize(ThreadHandle::Kind kind) { | 360 void Initialize(ThreadHandle::Kind kind) { |
| 356 switch (kind) { | 361 switch (kind) { |
| 357 case ThreadHandle::SELF: thread_ = pthread_self(); break; | 362 case ThreadHandle::SELF: thread_ = pthread_self(); break; |
| 358 case ThreadHandle::INVALID: thread_ = kNoThread; break; | 363 case ThreadHandle::INVALID: thread_ = kNoThread; break; |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 } | 646 } |
| 642 | 647 |
| 643 // This sampler is no longer the active sampler. | 648 // This sampler is no longer the active sampler. |
| 644 active_sampler_ = NULL; | 649 active_sampler_ = NULL; |
| 645 active_ = false; | 650 active_ = false; |
| 646 } | 651 } |
| 647 | 652 |
| 648 #endif // ENABLE_LOGGING_AND_PROFILING | 653 #endif // ENABLE_LOGGING_AND_PROFILING |
| 649 | 654 |
| 650 } } // namespace v8::internal | 655 } } // namespace v8::internal |
| OLD | NEW |