This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
exception storage overhead
- To: bug-gcc at gnu dot org
- Subject: exception storage overhead
- From: Erik Smith <ersmith at ucsd dot edu>
- Date: Mon, 29 May 2000 23:05:09 -0700
GCC version: 2.95.2
Why does the use of exceptions cause a trivial 11K program to jump to
119K. What could possibly be involved in the exception overhead that would
require 109K of code?
struct Foo {
void run(int j) {if (j<0) throw 1;}
};
int main(void) {
try {
Foo foo;
for(int i=0;i<=10000000;++i) {
for(int j=0;j<=10;++j) {
foo.run(j);
}
}
}
catch (...) {return 1;}
return 0;
}