1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Minor syntax tweaks:

- Remove some extra blank lines.
- Remove comments that don't contribute to understanding.
- Remove additional blank lines in output added to maximize compatibility
  with older vmstat output, but that is actually somewhat gratuitous.

Submitted by:	bde
MFC with:	other vmstat libmemstat(3) changes
This commit is contained in:
Robert Watson 2005-07-28 09:45:08 +00:00
parent 73ca9658a6
commit b9dc1340d2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148472

View File

@ -897,9 +897,6 @@ dointr(void)
(long long)inttotal, (long long)(inttotal / uptime));
}
/*
* Query libmemstat(3) for information on malloc(9).
*/
static void
domemstat_malloc(void)
{
@ -912,17 +909,13 @@ domemstat_malloc(void)
warn("memstat_mtl_alloc");
return;
}
if (memstat_sysctl_malloc(mtlp, 0) < 0) {
warnx("memstat_sysctl_malloc: %s",
memstat_strerror(memstat_mtl_geterror(mtlp)));
return;
}
printf("\n");
printf("%13s %5s %6s %7s %8s Size(s)\n", "Type", "InUse", "MemUse",
"HighUse", "Requests");
for (mtp = memstat_mtl_first(mtlp); mtp != NULL;
mtp = memstat_mtl_next(mtp)) {
if (memstat_get_numallocs(mtp) == 0 &&
@ -932,7 +925,6 @@ domemstat_malloc(void)
memstat_get_name(mtp), memstat_get_count(mtp),
((int64_t)memstat_get_bytes(mtp) + 1023) / 1024, "-",
memstat_get_numallocs(mtp));
first = 1;
for (i = 0; i < 32; i++) {
if (memstat_get_sizemask(mtp) & (1 << i)) {
@ -944,13 +936,9 @@ domemstat_malloc(void)
}
printf("\n");
}
memstat_mtl_free(mtlp);
}
/*
* Query libmemstat(3) for information on uma(9).
*/
static void
domemstat_zone(void)
{
@ -963,17 +951,13 @@ domemstat_zone(void)
warn("memstat_mtl_alloc");
return;
}
if (memstat_sysctl_uma(mtlp, 0) < 0) {
warnx("memstat_sysctl_uma: %s",
memstat_strerror(memstat_mtl_geterror(mtlp)));
return;
}
printf("\n");
printf("%-15s %-8s %-9s %-7s %-5s %-8s\n\n", "ITEM", "SIZE", "LIMIT",
"USED", "FREE", "REQUESTS");
for (mtp = memstat_mtl_first(mtlp); mtp != NULL;
mtp = memstat_mtl_next(mtp)) {
strlcpy(name, memstat_get_name(mtp), MEMTYPE_MAXNAME);
@ -983,7 +967,6 @@ domemstat_zone(void)
memstat_get_count(mtp), memstat_get_free(mtp),
memstat_get_numallocs(mtp));
}
memstat_mtl_free(mtlp);
printf("\n");
}