File: meminfo.h

package info (click to toggle)
earlyoom 1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 204 kB
  • sloc: ansic: 718; makefile: 82; sh: 71
file content (20 lines) | stat: -rw-r--r-- 531 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* SPDX-License-Identifier: MIT */
#ifndef MEMINFO_H
#define MEMINFO_H

typedef struct {
    // Values from /proc/meminfo, in KiB or converted to MiB.
    long MemTotalKiB;
    int MemTotalMiB;
    int MemAvailableMiB; // -1 means no data available
    int SwapTotalMiB;
    long SwapTotalKiB;
    int SwapFreeMiB;
    // Calculated percentages
    int MemAvailablePercent; // percent of total memory that is available
    int SwapFreePercent; // percent of total swap that is free
} meminfo_t;

meminfo_t parse_meminfo();

#endif