haba713 Asked: 2023-11-15 18:09:34 +0800 CST2023-11-15 18:09:34 +0800 CST 2023-11-15 18:09:34 +0800 CST pmap 总计总是以千字节为单位? 772 Linux 命令“pmap”是否总是给出以千字节为单位的总内存使用量? $ pmap 3208920 | tail -n 1 total 71836K linux 1 个回答 Voted Best Answer Stephen Kitt 2023-11-15T18:13:27+08:002023-11-15T18:13:27+08:00 它始终以千字节为单位显示: if (sizeof(long) == 8) /* Translation Hint: keep total string length * as 24 characters. Adjust %16 if needed*/ printf(_(" total %16ldK\n"), (total_shared + total_private_writeable + total_private_readonly) >> 10); else /* Translation Hint: keep total string length * as 16 characters. Adjust %8 if needed*/ printf(_(" total %8ldK\n"), (total_shared + total_private_writeable + total_private_readonly) >> 10); (右移 10 相当于除以 1,024。)
它始终以千字节为单位显示:
(右移 10 相当于除以 1,024。)