2020-07-06 17:31:40 +00:00
|
|
|
#pragma once
|
|
|
|
#ifndef MANGOHUD_MEMORY_H
|
|
|
|
#define MANGOHUD_MEMORY_H
|
|
|
|
|
2020-01-31 20:09:55 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <thread>
|
|
|
|
|
2020-12-13 10:07:17 +00:00
|
|
|
extern float memused, memmax, swapused, swapmax;
|
2020-01-31 21:48:12 +00:00
|
|
|
|
2020-01-31 20:09:55 +00:00
|
|
|
struct memory_information {
|
|
|
|
/* memory information in kilobytes */
|
|
|
|
unsigned long long mem, memwithbuffers, memeasyfree, memfree, memmax,
|
|
|
|
memdirty;
|
|
|
|
unsigned long long swap, swapfree, swapmax;
|
|
|
|
unsigned long long bufmem, buffers, cached;
|
|
|
|
};
|
|
|
|
|
2021-08-07 12:55:04 +00:00
|
|
|
struct process_mem
|
|
|
|
{
|
2021-08-08 14:21:45 +00:00
|
|
|
int64_t virt, resident, shared;
|
|
|
|
int64_t text, data, dirty;
|
2021-08-07 12:55:04 +00:00
|
|
|
};
|
|
|
|
extern process_mem proc_mem;
|
|
|
|
|
2020-05-01 21:55:21 +00:00
|
|
|
void update_meminfo(void);
|
2021-08-07 12:55:04 +00:00
|
|
|
void update_procmem();
|
2020-05-10 12:11:56 +00:00
|
|
|
FILE *open_file(const char *file, int *reported);
|
2020-07-06 17:31:40 +00:00
|
|
|
|
|
|
|
#endif //MANGOHUD_MEMORY_H
|