| Index: runtime/vm/os_fuchsia.cc
|
| diff --git a/runtime/vm/os_fuchsia.cc b/runtime/vm/os_fuchsia.cc
|
| index 10e2640e922a7e6815ac38b1382d96088c88fc9b..72f854846d78276aca3dabae1b9d69502aa7b0e4 100644
|
| --- a/runtime/vm/os_fuchsia.cc
|
| +++ b/runtime/vm/os_fuchsia.cc
|
| @@ -8,7 +8,9 @@
|
| #include "vm/os.h"
|
|
|
| #include <errno.h>
|
| +#include <magenta/process.h>
|
| #include <magenta/syscalls.h>
|
| +#include <magenta/syscalls/object.h>
|
| #include <magenta/types.h>
|
|
|
| #include "platform/assert.h"
|
| @@ -156,8 +158,11 @@ int OS::NumberOfAvailableProcessors() {
|
|
|
|
|
| uintptr_t OS::MaxRSS() {
|
| - // TODO(US-95): Implement.
|
| - return 0;
|
| + mx_info_task_stats_t task_stats;
|
| + mx_handle_t process = mx_process_self();
|
| + mx_status_t status = mx_object_get_info(
|
| + process, MX_INFO_TASK_STATS, &task_stats, sizeof(task_stats), NULL, NULL);
|
| + return (status == NO_ERROR) ? task_stats.mem_committed_bytes : 0;
|
| }
|
|
|
|
|
|
|