简体   繁体   中英

how can i know the footprint of my .so library?

In embedded we often listen word like low footprint library.

so how can i know the footprint of my library.so or library.a file..? how can i calculate that

is it same as the memory size of that library?

The only real why to find out the memory footprint is by running the executable that uses the library and see how it uses it. An executable typically uses only a subset of a library. For example a library might have a list that holds objects that are dynamically created by the library when a client pushes another item to the list. The more items that are pushed to the list, the more memory consumed by the library.

You can see how much memory a process consumes (heap and otherwise) by looking in procfs: cat /proc//mem .

" ps aux " will also give you the virtual memory size (VSZ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM