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

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: 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
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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 kMmapFd, 694 kMmapFd,
695 kMmapFdOffset) != MAP_FAILED; 695 kMmapFdOffset) != MAP_FAILED;
696 } 696 }
697 697
698 698
699 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { 699 bool VirtualMemory::ReleaseRegion(void* base, size_t size) {
700 return munmap(base, size) == 0; 700 return munmap(base, size) == 0;
701 } 701 }
702 702
703 703
704 bool VirtualMemory::HasLazyCommits() {
705 return true;
706 }
707
708
704 class Thread::PlatformData : public Malloced { 709 class Thread::PlatformData : public Malloced {
705 public: 710 public:
706 PlatformData() : thread_(kNoThread) {} 711 PlatformData() : thread_(kNoThread) {}
707 712
708 pthread_t thread_; // Thread handle for pthread. 713 pthread_t thread_; // Thread handle for pthread.
709 }; 714 };
710 715
711 Thread::Thread(const Options& options) 716 Thread::Thread(const Options& options)
712 : data_(new PlatformData()), 717 : data_(new PlatformData()),
713 stack_size_(options.stack_size()) { 718 stack_size_(options.stack_size()) {
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 1292
1288 1293
1289 void Sampler::Stop() { 1294 void Sampler::Stop() {
1290 ASSERT(IsActive()); 1295 ASSERT(IsActive());
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') | src/spaces.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698