top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

How to find size of a function in c?

+3 votes
90 views
How to find size of a function in c?
posted Sep 21, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes
 
Best answer

There is a way to determine the size of a function. The command is:

nm -S "object_file_name"

This will return the sizes of each function inside the object file. Consult the manual pages in the GNU using 'man nm' to gather more information on this.

answer Sep 21, 2014 by Aarti Jain
Hi Aarti,
Is there a way to achieve the same using programming?(Not through command line). Maybe with the help of some dummy function logic or subtracting the addresses of 2 functions?
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...