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...) 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 |
474 class Thread::PlatformData : public Malloced { | 481 class Thread::PlatformData : public Malloced { |
475 public: | 482 public: |
476 PlatformData() : thread_(kNoThread) {} | 483 PlatformData() : thread_(kNoThread) {} |
477 pthread_t thread_; // Thread handle for pthread. | 484 pthread_t thread_; // Thread handle for pthread. |
478 }; | 485 }; |
479 | 486 |
480 | 487 |
481 Thread::Thread(const Options& options) | 488 Thread::Thread(const Options& options) |
482 : data_(new PlatformData), | 489 : data_(new PlatformData), |
483 stack_size_(options.stack_size()) { | 490 stack_size_(options.stack_size()) { |
(...skipping 434 matching lines...) Loading... |
918 | 925 |
919 | 926 |
920 void Sampler::Stop() { | 927 void Sampler::Stop() { |
921 ASSERT(IsActive()); | 928 ASSERT(IsActive()); |
922 SamplerThread::RemoveActiveSampler(this); | 929 SamplerThread::RemoveActiveSampler(this); |
923 SetActive(false); | 930 SetActive(false); |
924 } | 931 } |
925 | 932 |
926 | 933 |
927 } } // namespace v8::internal | 934 } } // namespace v8::internal |
OLD | NEW |