OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "bin/embedded_dart_io.h" | 5 #include "bin/embedded_dart_io.h" |
6 | 6 |
7 #include "bin/directory.h" | 7 #include "bin/directory.h" |
8 #include "bin/eventhandler.h" | 8 #include "bin/eventhandler.h" |
9 #include "bin/platform.h" | 9 #include "bin/platform.h" |
| 10 #include "bin/process.h" |
10 #include "bin/thread.h" | 11 #include "bin/thread.h" |
11 #include "bin/utils.h" | 12 #include "bin/utils.h" |
12 | 13 |
13 namespace dart { | 14 namespace dart { |
14 namespace bin { | 15 namespace bin { |
15 | 16 |
16 void BootstrapDartIo() { | 17 void BootstrapDartIo() { |
17 // Bootstrap 'dart:io' event handler. | 18 // Bootstrap 'dart:io' event handler. |
18 Thread::InitOnce(); | 19 Thread::InitOnce(); |
19 TimerUtils::InitOnce(); | 20 TimerUtils::InitOnce(); |
20 EventHandler::Start(); | 21 EventHandler::Start(); |
21 } | 22 } |
22 | 23 |
23 void SetSystemTempDirectory(const char* system_temp) { | 24 void SetSystemTempDirectory(const char* system_temp) { |
24 Directory::SetSystemTemp(system_temp); | 25 Directory::SetSystemTemp(system_temp); |
25 } | 26 } |
26 | 27 |
27 void SetExecutableName(const char* executable_name) { | 28 void SetExecutableName(const char* executable_name) { |
28 Platform::SetExecutableName(executable_name); | 29 Platform::SetExecutableName(executable_name); |
29 } | 30 } |
30 | 31 |
31 void SetExecutableArguments(int script_index, char** argv) { | 32 void SetExecutableArguments(int script_index, char** argv) { |
32 Platform::SetExecutableArguments(script_index, argv); | 33 Platform::SetExecutableArguments(script_index, argv); |
33 } | 34 } |
34 | 35 |
| 36 void GetIOEmbedderInformation(Dart_EmbedderInformation* info) { |
| 37 ASSERT(info != NULL); |
| 38 ASSERT(info->version == DART_EMBEDDER_INFORMATION_CURRENT_VERSION); |
| 39 |
| 40 Process::GetRSSInformation(&(info->max_rss), &(info->current_rss)); |
| 41 } |
| 42 |
35 } // namespace bin | 43 } // namespace bin |
36 } // namespace dart | 44 } // namespace dart |
OLD | NEW |