diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-12-29 12:28:32 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-29 12:28:32 +0100 |
commit | 0d5e0e4cad512ebdcebc1c9a9171c412fcabbd3b (patch) | |
tree | a2de0fd9c829c96cd564413cae634319fb227ff8 /Libraries/LibCore | |
parent | ffbe975ffc0e1a442247c5ff0a62b89aad9ac0a5 (diff) | |
download | serenity-0d5e0e4cad512ebdcebc1c9a9171c412fcabbd3b.zip |
Kernel+SystemMonitor: Expose amount of per-process dirty private memory
Dirty private memory is all memory in non-inode-backed mappings that's
process-private, meaning it's not shared with any other process.
This patch exposes that number via SystemMonitor, giving us an idea of
how much memory each process is responsible for all on its own.
Diffstat (limited to 'Libraries/LibCore')
-rw-r--r-- | Libraries/LibCore/CProcessStatisticsReader.cpp | 1 | ||||
-rw-r--r-- | Libraries/LibCore/CProcessStatisticsReader.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibCore/CProcessStatisticsReader.cpp b/Libraries/LibCore/CProcessStatisticsReader.cpp index 07ba35f875..4e0adc8e13 100644 --- a/Libraries/LibCore/CProcessStatisticsReader.cpp +++ b/Libraries/LibCore/CProcessStatisticsReader.cpp @@ -38,6 +38,7 @@ HashMap<pid_t, CProcessStatistics> CProcessStatisticsReader::get_all() process.amount_virtual = process_object.get("amount_virtual").to_u32(); process.amount_resident = process_object.get("amount_resident").to_u32(); process.amount_shared = process_object.get("amount_shared").to_u32(); + process.amount_dirty_private = process_object.get("amount_dirty_private").to_u32(); process.amount_purgeable_volatile = process_object.get("amount_purgeable_volatile").to_u32(); process.amount_purgeable_nonvolatile = process_object.get("amount_purgeable_nonvolatile").to_u32(); process.icon_id = process_object.get("icon_id").to_int(); diff --git a/Libraries/LibCore/CProcessStatisticsReader.h b/Libraries/LibCore/CProcessStatisticsReader.h index 4fa3806782..34b353d85f 100644 --- a/Libraries/LibCore/CProcessStatisticsReader.h +++ b/Libraries/LibCore/CProcessStatisticsReader.h @@ -39,6 +39,7 @@ struct CProcessStatistics { size_t amount_virtual; size_t amount_resident; size_t amount_shared; + size_t amount_dirty_private; size_t amount_purgeable_volatile; size_t amount_purgeable_nonvolatile; int icon_id; |