Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does anyone know similar blog entries, articles or tutorial?


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-...

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

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.


I have written on some low level stuff on C and C++

C++ object model described with c code: http://www.avabodh.com/cxxin/cxx.html

How c code is translated to assembly: http://www.avabodh.com/cin/cin.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: