Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Side by Side Diff: src/platform-macos.cc

Issue 10961042: Implement committed physical memory stats for Linux. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing comments. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/platform-linux.cc ('k') | src/platform-nullos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « src/platform-linux.cc ('k') | src/platform-nullos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698