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

Side by Side Diff: src/d8.cc

Issue 300713002: Move NumberOfProcessorsOnline from CPU to OS (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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/cpu.cc ('k') | src/isolate.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 // Defined when linking against shared lib on Windows. 6 // Defined when linking against shared lib on Windows.
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED)
8 #define V8_SHARED 8 #define V8_SHARED
9 #endif 9 #endif
10 10
(...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 v8::V8::SetArrayBufferAllocator(&mock_arraybuffer_allocator); 1471 v8::V8::SetArrayBufferAllocator(&mock_arraybuffer_allocator);
1472 } else { 1472 } else {
1473 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); 1473 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator);
1474 } 1474 }
1475 int result = 0; 1475 int result = 0;
1476 Isolate* isolate = Isolate::New(); 1476 Isolate* isolate = Isolate::New();
1477 #ifndef V8_SHARED 1477 #ifndef V8_SHARED
1478 v8::ResourceConstraints constraints; 1478 v8::ResourceConstraints constraints;
1479 constraints.ConfigureDefaults(i::OS::TotalPhysicalMemory(), 1479 constraints.ConfigureDefaults(i::OS::TotalPhysicalMemory(),
1480 i::OS::MaxVirtualMemory(), 1480 i::OS::MaxVirtualMemory(),
1481 i::CPU::NumberOfProcessorsOnline()); 1481 i::OS::NumberOfProcessorsOnline());
1482 v8::SetResourceConstraints(isolate, &constraints); 1482 v8::SetResourceConstraints(isolate, &constraints);
1483 #endif 1483 #endif
1484 DumbLineEditor dumb_line_editor(isolate); 1484 DumbLineEditor dumb_line_editor(isolate);
1485 { 1485 {
1486 Isolate::Scope scope(isolate); 1486 Isolate::Scope scope(isolate);
1487 Initialize(isolate); 1487 Initialize(isolate);
1488 #ifdef ENABLE_VTUNE_JIT_INTERFACE 1488 #ifdef ENABLE_VTUNE_JIT_INTERFACE
1489 vTune::InitializeVtuneForV8(); 1489 vTune::InitializeVtuneForV8();
1490 #endif 1490 #endif
1491 PerIsolateData data(isolate); 1491 PerIsolateData data(isolate);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 } 1545 }
1546 1546
1547 } // namespace v8 1547 } // namespace v8
1548 1548
1549 1549
1550 #ifndef GOOGLE3 1550 #ifndef GOOGLE3
1551 int main(int argc, char* argv[]) { 1551 int main(int argc, char* argv[]) {
1552 return v8::Shell::Main(argc, argv); 1552 return v8::Shell::Main(argc, argv);
1553 } 1553 }
1554 #endif 1554 #endif
OLDNEW
« no previous file with comments | « src/cpu.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698