C++ exception code size / recommended practice
Tim Jansen
ml@tjansen.de
Thu Apr 10 19:46:00 GMT 2003
On Thursday 10 April 2003 18:42, Joe Buck wrote:
> Actually, the extra size is, for the most part, not code at all; rather,
> it is tables (for specifying how the stack is to be unwound if an
> exception occurs).
Yes, ca 50%. Here are some values (the same app as in my first mail, gcc 3.3
prerelease on x86, but now with -O2):
Without exceptions:
Filesize: 350092 bytes
.text : 298400
.eh_frame: 4
.gcc_except_table: does not exist
.eh_frame_hdr: does not exist
With exceptions:
Filesize: 524732 bytes
.text: 387936
.eh_frame: 45340
.gcc_except_table: 31280
.eh_frame_hdr: 7948
With exceptions, -fno-enforce-eh-specs:
Filesize: 523836 bytes
.text: 385856
.eh_frame: 45364
.gcc_except_table: 30002
.eh_frame_hdr: 7948
(there are only a few throw() declarations)
bye...
More information about the Gcc
mailing list