lkml.org 
[lkml]   [2000]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Criticism] On the discussion about C++ modules


Eray Ozkural wrote:
>
> "Jeff V. Merkey" wrote:
> > There are some elements that are attractive, but overall, why would a
> > device thread want to allocate memory from an interrupt
>
> I don't how you would do such a thing in C++. Allocators and the
> stuff I talked about make it more efficient and safer to manage
> memory. They don't throw memory calls all over the place. :P

More routines touching more memory on more cache lines (generating more
MESI traffic between the cache controllers). Plus the poor schmuck who
has to maintain the source code will will have to debug his 10
instruction read and write code (in C) to IO register which now does 4
copies, and is 500 instrutions long (in C++) (copying memory is
expensive). Oh, I almost forgot, the processor also will have to
generate an AGI (address generation interlock) since you will load an
address then immediately jump to it in all the jump tables that the C++
compiler will put in for every function you call (and your multiple
instruction piplines will be reduced to one, since the processor has to
go serial to handle the AGI correctly). In flat model code, jumps to
functions within a single 4GB segment (or larger) are just done with
simple math internally in the processor -- C++ injects one or more
memory fetches in between each function call, plus they use 2-3 times as
much stack memory. Eh....

:-)

Jeff


>
> Thanks,
>
> --
> Eray (exa) Ozkural
> Comp. Sci. Dept., Bilkent University, Ankara
> e-mail: erayo@cs.bilkent.edu.tr
> www: http://www.cs.bilkent.edu.tr/~erayo
-
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/

\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.181 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site