Re: [Criticism] On the discussion about C++ modules

From: Timur Tabi (ttabi@interactivesi.com)
Date: Mon Oct 16 2000 - 11:32:38 EST


** Reply to message from "Jeff V. Merkey" <jmerkey@timpanogas.org> on Sun, 15
Oct 2000 18:06:05 -0600

> The [new] and constructor/destructor operations create hidden memory
> allocations in C++ that can blow performance in kernel "fast paths".

I don't consider the memory allocation that [new] and constructor/destructor
operations perform to be "hidden". In fact, anyone who thinks that [new]
doesn't allocate memory is a moron. [new] is nothing more than a malloc
followed by an indirect function call with a single pointer parameter passed.
There's nothing hidden or secret about that.

However, I do agree that for many kernel operations, C++ doesn't help any.
However, that doesn't mean that people writing device drivers should be
excluded from using C++. Having known C++ keywords in header files, and
refusing to change them because you don't want other people using C++, is
selfish and narrow-minded and not something that a Linux programmer should be
proud of.

-- 
Timur Tabi - ttabi@interactivesi.com
Interactive Silicon - http://www.interactivesi.com

When replying to a mailing-list message, please don't cc: me, because then I'll just get two copies of the same message. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:09 EST