开发者

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 footpri开发者_Go百科nt 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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜