You are not logged in.
why size command does not show size of heap and stack segments ?
text data bss dec hex filename
1663 376 8 2047 7ff a.out
is there any command to show these values ?
what is hex and dec columns in the command output ?
The dynamic heap and the stack are both run-time things, not actually stored in the binary file... Both of those grow on demand as needed... "size" is just showing you sections stored in the actual binary: "text" is the code (and maybe any read-only data), "data" is initialized global/static variables and maybe some other stuff, and "bss" is uninitialized globals/statics (which will automatically get set to 0/NULL)... The "dec" and "hex" columns are just showing you the grand total section size in decimal and hexidecimal respectively... Try "size -A" for an alternate output format, which will likely break it down into more separate sections than just those 3... You can also get at the sections with "objdump" and "readelf"...