haiku/headers/private/system/system_info.h
Axel Dörfler ca7cb625b9 * Implemented a (private for now) get_system_info_etc() call, that can retrieve
various system information.
* Implemented retrieving some VM stats via this call.
* The VM now maintains a page fault counter, and sets system_info::page_faults
  accordingly.
* Added a (pretty simple) "vmstat" command line app.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-17 16:27:17 +00:00

38 lines
646 B
C

/*
* Copyright 2008 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _SYSTEM_INFO_H
#define _SYSTEM_INFO_H
#include <OS.h>
#define B_MEMORY_INFO 'memo'
struct system_memory_info {
uint64 max_memory;
uint64 free_memory;
uint64 needed_memory;
uint64 max_swap_space;
uint64 free_swap_space;
uint64 block_cache_memory;
uint32 page_faults;
// TODO: add active/inactive page counts, swap in/out, ...
};
#ifdef __cplusplus
extern "C" {
#endif
extern status_t get_system_info_etc(int32 id, void *buffer, size_t bufferSize);
#ifdef __cplusplus
}
#endif
#endif /* _SYSTEM_INFO_H */