diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 31 |
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 }; | |||
1387 | enum { COMM_LEN = 16 }; | 1387 | enum { COMM_LEN = 16 }; |
1388 | # endif | 1388 | # endif |
1389 | #endif | 1389 | #endif |
1390 | |||
1391 | struct smaprec { | ||
1392 | unsigned long mapped_rw; | ||
1393 | unsigned long mapped_ro; | ||
1394 | unsigned long shared_clean; | ||
1395 | unsigned long shared_dirty; | ||
1396 | unsigned long private_clean; | ||
1397 | unsigned long private_dirty; | ||
1398 | unsigned long stack; | ||
1399 | unsigned long smap_pss, smap_swap; | ||
1400 | unsigned long smap_size; | ||
1401 | unsigned long smap_start; | ||
1402 | char smap_mode[5]; | ||
1403 | char *smap_name; | ||
1404 | }; | ||
1405 | |||
1406 | #if !ENABLE_PMAP | ||
1407 | #define procps_read_smaps(pid, total, cb, data) \ | ||
1408 | procps_read_smaps(pid, total) | ||
1409 | #endif | ||
1410 | int FAST_FUNC procps_read_smaps(pid_t pid, struct smaprec *total, | ||
1411 | void (*cb)(struct smaprec *, void *), void *data); | ||
1412 | |||
1390 | typedef struct procps_status_t { | 1413 | typedef struct procps_status_t { |
1391 | DIR *dir; | 1414 | DIR *dir; |
1392 | IF_FEATURE_SHOW_THREADS(DIR *task_dir;) | 1415 | IF_FEATURE_SHOW_THREADS(DIR *task_dir;) |
@@ -1415,13 +1438,7 @@ typedef struct procps_status_t { | |||
1415 | #endif | 1438 | #endif |
1416 | unsigned tty_major,tty_minor; | 1439 | unsigned tty_major,tty_minor; |
1417 | #if ENABLE_FEATURE_TOPMEM | 1440 | #if ENABLE_FEATURE_TOPMEM |
1418 | unsigned long mapped_rw; | 1441 | struct smaprec smaps; |
1419 | unsigned long mapped_ro; | ||
1420 | unsigned long shared_clean; | ||
1421 | unsigned long shared_dirty; | ||
1422 | unsigned long private_clean; | ||
1423 | unsigned long private_dirty; | ||
1424 | unsigned long stack; | ||
1425 | #endif | 1442 | #endif |
1426 | char state[4]; | 1443 | char state[4]; |
1427 | /* basename of executable in exec(2), read from /proc/N/stat | 1444 | /* basename of executable in exec(2), read from /proc/N/stat |