[Insight-developers] Empty FixedArray destructor: Performancehit using gcc (times 2)
Tom Vercauteren
tom.vercauteren at m4x.org
Fri Jun 6 03:22:37 EDT 2008
Hi Sean,
> I'm afraid I haven't followed this thread very closely, but... this
> memory that is not aligned as you'd like, how was it allocated?
> malloc()? new? Or is it an instance variable in a class/struct?
As shown in the small piece of code, here is how the memory is allocated:
typedef itk::FixedArray<double,2> ArrayType;
ArrayType * vec = new ArrayType[nelements+8];
Note that in the real-life setup, memory allocation is done through
the itk::Image::Allocate() method which does something very similar.
Tom
More information about the Insight-developers
mailing list