1 个不稳定版本
0.1.0 | 2023 年 10 月 16 日 |
---|
#2537 在 命令行工具
16KB
55 行
size-rs
会显示在您的系统上,某些 Rust 和 libc 结构所占用的内存大小。可能仅在 Linux 系统上工作
$ size-rs
Integer sizes:
u8: 1 byte - 8 bits
u16: 2 bytes - 16 bits
u32: 4 bytes - 32 bits
u64: 8 bytes - 64 bits
u128: 16 bytes - 128 bits
Ids types:
pid_t: 4 bytes - 32 bits
uid_t: 4 bytes - 32 bits
gid_t: 4 bytes - 32 bits
id_t: 4 bytes - 32 bits
Files related sizes:
ino_t: 8 bytes - 64 bits
off_t: 8 bytes - 64 bits
loff_t: 8 bytes - 64 bits
dev_t: 8 bytes - 64 bits
dirent: 280 bytes - 2240 bits
ino64_t: 8 bytes - 64 bits
off64_t: 8 bytes - 64 bits
dirent64: 280 bytes - 2240 bits
Length sizes:
size_t: 8 bytes - 64 bits
ssize_t: 8 bytes - 64 bits
依赖项
~1.2–1.8MB
~35K SLoC