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

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

Issue 24269003: Add methods to enable configuration of ResourceConstraints based on limits derived at runtime. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: /s/uintptr_t/uint64_t Created 7 years, 3 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-posix.cc ('k') | tools/gyp/v8.gyp » ('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 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 if (!LoadDbgHelpAndTlHelp32()) return; 1201 if (!LoadDbgHelpAndTlHelp32()) return;
1202 HANDLE process_handle = GetCurrentProcess(); 1202 HANDLE process_handle = GetCurrentProcess();
1203 LoadSymbols(isolate, process_handle); 1203 LoadSymbols(isolate, process_handle);
1204 } 1204 }
1205 1205
1206 1206
1207 void OS::SignalCodeMovingGC() { 1207 void OS::SignalCodeMovingGC() {
1208 } 1208 }
1209 1209
1210 1210
1211 uint64_t OS::TotalPhysicalMemory() {
1212 MEMORYSTATUSEX memory_info;
1213 memory_info.dwLength = sizeof(memory_info);
1214 if (!GlobalMemoryStatusEx(&memory_info)) {
1215 UNREACHABLE();
1216 return 0;
1217 }
1218
1219 return static_cast<uint64_t>(memory_info.ullTotalPhys);
1220 }
1221
1222
1211 #else // __MINGW32__ 1223 #else // __MINGW32__
1212 void OS::LogSharedLibraryAddresses(Isolate* isolate) { } 1224 void OS::LogSharedLibraryAddresses(Isolate* isolate) { }
1213 void OS::SignalCodeMovingGC() { } 1225 void OS::SignalCodeMovingGC() { }
1214 #endif // __MINGW32__ 1226 #endif // __MINGW32__
1215 1227
1216 1228
1217 uint64_t OS::CpuFeaturesImpliedByPlatform() { 1229 uint64_t OS::CpuFeaturesImpliedByPlatform() {
1218 return 0; // Windows runs on anything. 1230 return 0; // Windows runs on anything.
1219 } 1231 }
1220 1232
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 ASSERT(result); 1457 ASSERT(result);
1446 } 1458 }
1447 1459
1448 1460
1449 1461
1450 void Thread::YieldCPU() { 1462 void Thread::YieldCPU() {
1451 Sleep(0); 1463 Sleep(0);
1452 } 1464 }
1453 1465
1454 } } // namespace v8::internal 1466 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-posix.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698