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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 kMmapFd, | 464 kMmapFd, |
465 kMmapFdOffset) != MAP_FAILED; | 465 kMmapFdOffset) != MAP_FAILED; |
466 } | 466 } |
467 | 467 |
468 | 468 |
469 bool VirtualMemory::ReleaseRegion(void* address, size_t size) { | 469 bool VirtualMemory::ReleaseRegion(void* address, size_t size) { |
470 return munmap(address, size) == 0; | 470 return munmap(address, size) == 0; |
471 } | 471 } |
472 | 472 |
473 | 473 |
474 bool VirtualMemory::CommittedPhysicalSizeInRegion( | |
475 void* base, size_t size, size_t* physical) { | |
476 // TODO(alph): implement for the platform. | |
477 return false; | |
478 } | |
479 | |
480 | |
481 class Thread::PlatformData : public Malloced { | 474 class Thread::PlatformData : public Malloced { |
482 public: | 475 public: |
483 PlatformData() : thread_(kNoThread) {} | 476 PlatformData() : thread_(kNoThread) {} |
484 pthread_t thread_; // Thread handle for pthread. | 477 pthread_t thread_; // Thread handle for pthread. |
485 }; | 478 }; |
486 | 479 |
487 | 480 |
488 Thread::Thread(const Options& options) | 481 Thread::Thread(const Options& options) |
489 : data_(new PlatformData), | 482 : data_(new PlatformData), |
490 stack_size_(options.stack_size()) { | 483 stack_size_(options.stack_size()) { |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 | 918 |
926 | 919 |
927 void Sampler::Stop() { | 920 void Sampler::Stop() { |
928 ASSERT(IsActive()); | 921 ASSERT(IsActive()); |
929 SamplerThread::RemoveActiveSampler(this); | 922 SamplerThread::RemoveActiveSampler(this); |
930 SetActive(false); | 923 SetActive(false); |
931 } | 924 } |
932 | 925 |
933 | 926 |
934 } } // namespace v8::internal | 927 } } // namespace v8::internal |
OLD | NEW |