aboutsummaryrefslogtreecommitdiff
path: root/include/libbb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libbb.h')
-rw-r--r--include/libbb.h31
1 files changed, 24 insertions, 7 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 3fd754511..43e525cb9 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1387,6 +1387,29 @@ enum { COMM_LEN = TASK_COMM_LEN };
enum { COMM_LEN = 16 };
# endif
#endif
+
+struct smaprec {
+ unsigned long mapped_rw;
+ unsigned long mapped_ro;
+ unsigned long shared_clean;
+ unsigned long shared_dirty;
+ unsigned long private_clean;
+ unsigned long private_dirty;
+ unsigned long stack;
+ unsigned long smap_pss, smap_swap;
+ unsigned long smap_size;
+ unsigned long smap_start;
+ char smap_mode[5];
+ char *smap_name;
+};
+
+#if !ENABLE_PMAP
+#define procps_read_smaps(pid, total, cb, data) \
+ procps_read_smaps(pid, total)
+#endif
+int FAST_FUNC procps_read_smaps(pid_t pid, struct smaprec *total,
+ void (*cb)(struct smaprec *, void *), void *data);
+
typedef struct procps_status_t {
DIR *dir;
IF_FEATURE_SHOW_THREADS(DIR *task_dir;)
@@ -1415,13 +1438,7 @@ typedef struct procps_status_t {
#endif
unsigned tty_major,tty_minor;
#if ENABLE_FEATURE_TOPMEM
- unsigned long mapped_rw;
- unsigned long mapped_ro;
- unsigned long shared_clean;
- unsigned long shared_dirty;
- unsigned long private_clean;
- unsigned long private_dirty;
- unsigned long stack;
+ struct smaprec smaps;
#endif
char state[4];
/* basename of executable in exec(2), read from /proc/N/stat