Storage Layout of Polymorphic Objects -- Dan Saks

It's great to see Dan writing about C++ again. Here's his latest today, in Dr. Dobb's:

Storage Layout of Polymorphic Objects

By Dan Saks

Adding at least one virtual function to a class alters the storage layout for all objects of that class type.

Adding at least one virtual function to a class alters the storage layout for all objects of that class type. In this article, I begin to explain how C++ compilers typically implement virtual functions by explaining how the use of virtual functions affects the storage layout for objects.

Continue reading...

Add a Comment

Comments are closed.

Comments (2)

0 0

Dan Saks said on Nov 18, 2012 08:47 PM:

It's nice to be missed, but I actually never stopped writing about C++. I guess my writing has been below the radar of the Standard C++ community.

I've been writing about C and C++ programming for Embedded Systems Programming magazine, which became Embedded System Design. The magazine ceased print publication last spring; however, I continue publishing online at embedded.com. All 14+ years of my columns are available at:

http://www.embedded.com/electronics-blogs/27/Programming-Pointers

Apparently, my writing came back in sight when Dr. Dobbs starting republishing selected articles late last year. (Both embedded.com and Dr. Dobbs are UBM properties.)

Much of my writing focuses on techniques for representing and manipulating low-level machine resources, especially memory-mapped devices, as efficient, high-level abstractions. I've devoted considerable energy to dispelling misinformation about C++ that appears to be rampant among the C programmers who dominate the embedded community. Those of you who've been laboring against such misinformation might be especially interested in my measurements comparing C++ and C performance in this area:

"Measuring instead of speculating"
http://www.embedded.com/electronics-blogs/programming-pointers/4211118
0 0

Blog Staff said on Nov 21, 2012 06:05 PM:

Thanks Dan, and please feel free to suggest such classic articles via "Suggest an Article" visible at top right when you're logged in. (See today's News post for details.)