Re: L4Ka::Pistachio code style
Ben Leslie <[email protected]>
| Newsgroups | gmane.comp.micro-kernel.l4.l4ka.general |
|---|---|
| Message-ID | <[email protected]> |
On Fri Nov 24, 2006 at 20:53:03 +0530, arnuld wrote: >i have browsed the source code of L4Ka::Pistachio 0.4 (L4P). most of >the source code in "kernel/src/" is written in this style: > >1.) "x->y(z)" : a struct pointer >2.) pointers instead of refrences : at most places. > >it is C++ written in C style rather than the C++ design advocated by >Stroustrup and other respected members of the C++ community . why >L4Ka::Pistachio adopted this style & why it does not use "Standard >Library, Class mechanism & Templates" at most places instead of that >low-level C style. [1] Because we don't want the overhead of virtual functions, and want to have a precise understanding of the data structure layout and the code generated. >i dont know C but i have done some C++ where i did some optimization >of 2 programmes, one using "string" class & other using "malloc/free" >& "string" class was as fast as "malloc/free" & i know Templates are >"compile-time" mechanism, hence not they do not produce any run-time >overhead. They can create large code which significantly impacts on the cache. >[1] i am not trying to start a flame-war. i only want to know the >issues, whether technical or others, behind this decision. i am pretty >much interested in microkernel based OSs & have read several papers & >articles on HURD, L4 & Coyotos, Haskell, BitC, MINIX & Common Lisp. i >was intersted in doing some contributions to a copyleft OS. L4 is not distributed under a copyleft license. Benno