MangoHud/src/memory.h

30 lines
655 B
C
Raw Normal View History

#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;
};
struct process_mem
{
int64_t virt, resident, shared;
int64_t text, data, dirty;
};
extern process_mem proc_mem;
2020-05-01 21:55:21 +00:00
void update_meminfo(void);
void update_procmem();
2020-05-10 12:11:56 +00:00
FILE *open_file(const char *file, int *reported);
#endif //MANGOHUD_MEMORY_H