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

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

Issue 11066118: 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-freebsd.cc ('k') | src/platform-macos.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 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 kMmapFd, 697 kMmapFd,
698 kMmapFdOffset) != MAP_FAILED; 698 kMmapFdOffset) != MAP_FAILED;
699 } 699 }
700 700
701 701
702 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { 702 bool VirtualMemory::ReleaseRegion(void* base, size_t size) {
703 return munmap(base, size) == 0; 703 return munmap(base, size) == 0;
704 } 704 }
705 705
706 706
707 bool VirtualMemory::HasLazyCommits() {
708 return true;
709 }
710
711
707 class Thread::PlatformData : public Malloced { 712 class Thread::PlatformData : public Malloced {
708 public: 713 public:
709 PlatformData() : thread_(kNoThread) {} 714 PlatformData() : thread_(kNoThread) {}
710 715
711 pthread_t thread_; // Thread handle for pthread. 716 pthread_t thread_; // Thread handle for pthread.
712 }; 717 };
713 718
714 Thread::Thread(const Options& options) 719 Thread::Thread(const Options& options)
715 : data_(new PlatformData()), 720 : data_(new PlatformData()),
716 stack_size_(options.stack_size()) { 721 stack_size_(options.stack_size()) {
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 1292
1288 void Sampler::Stop() { 1293 void Sampler::Stop() {
1289 ASSERT(IsActive()); 1294 ASSERT(IsActive());
1290 CpuProfilerSignalHandler::RestoreSignalHandler(); 1295 CpuProfilerSignalHandler::RestoreSignalHandler();
1291 SignalSender::RemoveActiveSampler(this); 1296 SignalSender::RemoveActiveSampler(this);
1292 SetActive(false); 1297 SetActive(false);
1293 } 1298 }
1294 1299
1295 1300
1296 } } // namespace v8::internal 1301 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-freebsd.cc ('k') | src/platform-macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698