Page 1 of 1

Calculating the size of a program at run-time

Posted: Wed Aug 18, 2004 12:02 am
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.

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

Posted: Wed Aug 18, 2004 11:18 am
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.....