Understanding Anonymous Inode 0 Entries in /proc/pid/maps for Memory Usage in Embedded Linux

I'm investigating memory usage in my embedded Linux application using /proc/pid/maps. I'm confused by the entries with anonymous inode 0 in the perms column in particular. Seem to be some of the larger memory segments. Take a look :
...
addr end perms offset dev id size flags name
...
f0000000-f0fffffff rw-p 0 0 0 1048576 anonvma [heap]
...
...
addr end perms offset dev id size flags name
...
f0000000-f0fffffff rw-p 0 0 0 1048576 anonvma [heap]
...
What does anonymous inode 0 entries mean? How does it contribute to my application's memory usage? @Middleware & OS
5 Replies
Enthernet Code
Enthernet Code7mo ago
Hello @Marvee Amasi, In the /proc/pid/maps file, the anonymous inode 0 entry represents memory mappings that are not associated with any file on the filesystem. These mappings are typically used for various purposes, such as the heap, stack, and other dynamically allocated memory in your application.
Marvee Amasi
Marvee Amasi7mo ago
Yh thanks man @Enthernet Code since anonymous memory isn't associated with files, does that mean it has less impact on storage space compared to file-based memory usage? Cus I'm mainly concerned about the application's overall memory footprint on my embedded device.
Enthernet Code
Enthernet Code7mo ago
Yes @Marvee Amasi as it only have impact on the Ram only
Marvee Amasi
Marvee Amasi7mo ago
That makes much sense now
Enthernet Code
Enthernet Code7mo ago
Yea it's just limited to the Ran resources required by the application runtime
Want results from more Discord servers?
Add your server