1
0

sysinfo.h 634 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef _SYS_SYSINFO_H
  2. #define _SYS_SYSINFO_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #define SI_LOAD_SHIFT 16
  7. struct sysinfo {
  8. unsigned long uptime;
  9. unsigned long loads[3];
  10. unsigned long totalram;
  11. unsigned long freeram;
  12. unsigned long sharedram;
  13. unsigned long bufferram;
  14. unsigned long totalswap;
  15. unsigned long freeswap;
  16. unsigned short procs, pad;
  17. unsigned long totalhigh;
  18. unsigned long freehigh;
  19. unsigned mem_unit;
  20. char __reserved[256];
  21. };
  22. int sysinfo (struct sysinfo *);
  23. int get_nprocs_conf (void);
  24. int get_nprocs (void);
  25. long get_phys_pages (void);
  26. long get_avphys_pages (void);
  27. #ifdef __cplusplus
  28. }
  29. #endif
  30. #endif