OLD | NEW |
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 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1689 if (options.mock_arraybuffer_allocator) { | 1689 if (options.mock_arraybuffer_allocator) { |
1690 v8::V8::SetArrayBufferAllocator(&mock_arraybuffer_allocator); | 1690 v8::V8::SetArrayBufferAllocator(&mock_arraybuffer_allocator); |
1691 } else { | 1691 } else { |
1692 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); | 1692 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); |
1693 } | 1693 } |
1694 int result = 0; | 1694 int result = 0; |
1695 Isolate* isolate = Isolate::GetCurrent(); | 1695 Isolate* isolate = Isolate::GetCurrent(); |
1696 #ifndef V8_SHARED | 1696 #ifndef V8_SHARED |
1697 v8::ResourceConstraints constraints; | 1697 v8::ResourceConstraints constraints; |
1698 constraints.ConfigureDefaults(i::OS::TotalPhysicalMemory(), | 1698 constraints.ConfigureDefaults(i::OS::TotalPhysicalMemory(), |
| 1699 i::OS::MaxVirtualMemory(), |
1699 i::CPU::NumberOfProcessorsOnline()); | 1700 i::CPU::NumberOfProcessorsOnline()); |
1700 v8::SetResourceConstraints(isolate, &constraints); | 1701 v8::SetResourceConstraints(isolate, &constraints); |
1701 #endif | 1702 #endif |
1702 DumbLineEditor dumb_line_editor(isolate); | 1703 DumbLineEditor dumb_line_editor(isolate); |
1703 { | 1704 { |
1704 Initialize(isolate); | 1705 Initialize(isolate); |
1705 #ifdef ENABLE_VTUNE_JIT_INTERFACE | 1706 #ifdef ENABLE_VTUNE_JIT_INTERFACE |
1706 vTune::InitializeVtuneForV8(); | 1707 vTune::InitializeVtuneForV8(); |
1707 #endif | 1708 #endif |
1708 PerIsolateData data(isolate); | 1709 PerIsolateData data(isolate); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1772 } | 1773 } |
1773 | 1774 |
1774 } // namespace v8 | 1775 } // namespace v8 |
1775 | 1776 |
1776 | 1777 |
1777 #ifndef GOOGLE3 | 1778 #ifndef GOOGLE3 |
1778 int main(int argc, char* argv[]) { | 1779 int main(int argc, char* argv[]) { |
1779 return v8::Shell::Main(argc, argv); | 1780 return v8::Shell::Main(argc, argv); |
1780 } | 1781 } |
1781 #endif | 1782 #endif |
OLD | NEW |