User: Password:
|
|
Subscribe / Log in / New account

KHB: Synthesis: An Efficient Implementation of Fundamental Operating Systems Services

KHB: Synthesis: An Efficient Implementation of Fundamental Operating Systems Services

Posted Feb 27, 2008 22:51 UTC (Wed) by pphaneuf (subscriber, #23480)
In reply to: KHB: Synthesis: An Efficient Implementation of Fundamental Operating Systems Services by zlynx
Parent article: KHB: Synthesis: An Efficient Implementation of Fundamental Operating Systems Services

My way is ugly. That way is insane.

Still, I wish it was possible to manipulate vptrs and vtbls more in C++. Things like having two different implementations of a virtual method with the same signature inherited from two parents would make sense, for example (say, the "draw" methods you get while deriving from both Drawable and Cowboy).


(Log in to post comments)

KHB: Synthesis: An Efficient Implementation of Fundamental Operating Systems Services

Posted Feb 28, 2008 20:59 UTC (Thu) by nix (subscriber, #2304) [Link]

Insane?

Oh.

So, er, I should be ashamed that I did almost exactly that (via a custom 
allocator layered atop big mmap()ed hunks) in C about a year ago? (Well, 
it was more like a twisted sort of RCU: I'd construct a new instance that 
was a copy of the old one with a zero reference count, then changing 
pointers in the new instance's VMT-analogue, translating the object's data 
into a new representation at the same time. The old instance got 
reference-zapped when nobody was executing methods via those pointers 
anymore.)

(yes, there were pressing reasons. It was a bundle of fun, as well. :) )


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds