Calculating the size of a program at run-time

Programming, for all ages and all languages.
Post Reply
NOTNULL

Calculating the size of a program at run-time

Post by NOTNULL »

Hello all,
Could any one explain me how to find the size of a program at run-time? ie., when i run my program, it should display the size of the file in bytes or may be the code segment itself.

Any help greatly appreciated.
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Re:Calculating the size of a program at run-time

Post by Neo »

Try using variables in your linker script. You can determine the address of each and every section of your program both start and end. as for the second part hmmm.....
Only Human
Post Reply