eminence / procfs

Rust library for reading the Linux procfs filesystem
Other
362 stars 106 forks source link

fix shm size type #243

Closed tatref closed 1 year ago

tatref commented 1 year ago

Seems like a made a mistake when I created this file.

Source shows unsigned long, so u32

https://elixir.bootlin.com/linux/latest/source/ipc/shm.c#L57 https://elixir.bootlin.com/linux/latest/source/ipc/shm.c#L1867

However, when creating a shared memory segment, it can be much bigger. In the create function, it is defined as a size_t, so u64

After testing, I can create a memory segment of 6 GB, the size field show 6425673728