mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
0ed89440f1
I originally called it "linear" because that's how the Intel manual names virtual addresses in many cases. I'm ready to accept that most people know this as "virtual" so let's just call it that.
29 lines
588 B
C++
29 lines
588 B
C++
#pragma once
|
|
|
|
#include <AK/AKString.h>
|
|
#include <AK/HashMap.h>
|
|
|
|
struct CProcessStatistics {
|
|
pid_t pid;
|
|
unsigned nsched;
|
|
String name;
|
|
String state;
|
|
String username;
|
|
uid_t uid;
|
|
String priority;
|
|
size_t virtual_size;
|
|
size_t physical_size;
|
|
unsigned syscalls;
|
|
};
|
|
|
|
class CProcessStatisticsReader {
|
|
public:
|
|
CProcessStatisticsReader();
|
|
HashMap<pid_t, CProcessStatistics> get_map();
|
|
|
|
private:
|
|
void update_map(HashMap<pid_t, CProcessStatistics>& map);
|
|
String get_username_from_uid(const uid_t uid);
|
|
|
|
HashMap<uid_t, String> m_usernames;
|
|
};
|