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

Side by Side Diff: src/platform-win32.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-solaris.cc ('k') | src/spaces.h » ('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 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after
1544 bool VirtualMemory::UncommitRegion(void* base, size_t size) { 1544 bool VirtualMemory::UncommitRegion(void* base, size_t size) {
1545 return VirtualFree(base, size, MEM_DECOMMIT) != 0; 1545 return VirtualFree(base, size, MEM_DECOMMIT) != 0;
1546 } 1546 }
1547 1547
1548 1548
1549 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { 1549 bool VirtualMemory::ReleaseRegion(void* base, size_t size) {
1550 return VirtualFree(base, 0, MEM_RELEASE) != 0; 1550 return VirtualFree(base, 0, MEM_RELEASE) != 0;
1551 } 1551 }
1552 1552
1553 1553
1554 bool VirtualMemory::HasLazyCommits() {
1555 // TODO(alph): implement for the platform.
1556 return false;
1557 }
1558
1559
1554 // ---------------------------------------------------------------------------- 1560 // ----------------------------------------------------------------------------
1555 // Win32 thread support. 1561 // Win32 thread support.
1556 1562
1557 // Definition of invalid thread handle and id. 1563 // Definition of invalid thread handle and id.
1558 static const HANDLE kNoThread = INVALID_HANDLE_VALUE; 1564 static const HANDLE kNoThread = INVALID_HANDLE_VALUE;
1559 1565
1560 // Entry point for threads. The supplied argument is a pointer to the thread 1566 // Entry point for threads. The supplied argument is a pointer to the thread
1561 // object. The entry function dispatches to the run method in the thread 1567 // object. The entry function dispatches to the run method in the thread
1562 // object. It is important that this function has __stdcall calling 1568 // object. It is important that this function has __stdcall calling
1563 // convention. 1569 // convention.
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
2127 2133
2128 2134
2129 void Sampler::Stop() { 2135 void Sampler::Stop() {
2130 ASSERT(IsActive()); 2136 ASSERT(IsActive());
2131 SamplerThread::RemoveActiveSampler(this); 2137 SamplerThread::RemoveActiveSampler(this);
2132 SetActive(false); 2138 SetActive(false);
2133 } 2139 }
2134 2140
2135 2141
2136 } } // namespace v8::internal 2142 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-solaris.cc ('k') | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698