Skip to content

Commit b719fb7

Browse files
committed
Nope, it doesn't work on Linux.
1 parent ccfcdf0 commit b719fb7

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

Common/Cpp/MemoryUtilization/MemoryUtilization_Linux.tpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <fstream>
1313
#include <iostream>
1414
#include <unistd.h>
15-
#include <sys/proc_info.h>
1615
#include "MemoryUtilization.h"
1716

1817
namespace PokemonAutomation{
@@ -68,16 +67,6 @@ MemoryUsage process_memory_usage(){
6867
usage.total_used_system_memory = usage.total_system_memory - bytes;
6968
}
7069

71-
pid_t pid = getpid();
72-
struct proc_taskinfo task_info;
73-
int ret = proc_pidinfo(pid, PROC_PIDTASKINFO, 0, &task_info, sizeof(task_info));
74-
75-
if (ret <= 0) {
76-
std::cerr << "Error getting process info for PID " << pid << ": " << strerror(errno) << std::endl;
77-
}else{
78-
usage.process_physical_memory = task_info.pti_resident_size;
79-
}
80-
8170
return usage;
8271
}
8372

0 commit comments

Comments
 (0)