2 ms·
Nicolás Brailovsky did a great exploration in to the internals of one modern implementation of structured C++ exception handling: http://monoinfinito.wordpres
by nly 13y ago
Nicolás Brailovsky did a great exploration in to the internals of one modern implementation of structured C++ exception handling:
http://monoinfinito.wordpress.com/series/exception-handling-in-c/ http://monoinfinito.wordpress.com/series/exception-handling-...
He went so far as to reimplement his own handlers, which is totally awesome.
For other important things, like the memory layout of the inheritance graph (generally optimal for single, non-virtual inheritance), virtual table layouts, the structure of member pointers and RTTI, the Itanium C++ ABI (followed by GCC and Clang on open OS's but not MS) is a good place to glean some insight:
http://refspecs.linuxbase.org/cxxabi-1.83.html http://refspecs.linuxbase.org/cxxabi-1.83.html
For instance, you may be surprised to learn that member pointers aren't even pointers in this implementation, but a pair of offsets (one for the object, one for the vtable) used to find the function to call.