lilydjwg / swapview-rosetta

Print swap usage per process. Implemented in various programming languages
493 stars 108 forks source link

Zig: update to Zig 0.11.0 and fix memory leakage #189

Closed zhangkaizhao closed 6 months ago

zhangkaizhao commented 6 months ago

Tested with Zig 0.11.0 on Linux x86_64.

lilydjwg commented 6 months ago

It exits with error: AccessDenied when trying to open /proc/1/smaps.

zhangkaizhao commented 6 months ago

It exits with error: AccessDenied when trying to open /proc/1/smaps.

Hi! Yes. Because /proc/1/smaps is owned by root:root:

ls -la /proc/1/smaps
-r--r--r--. 1 root root 0 Mar 20 10:16 /proc/1/smaps

Please run by root user.

lilydjwg commented 6 months ago

No. Please skip unreadable files.

zhangkaizhao commented 6 months ago

@lilydjwg OK. Updated.