[vtkusers] Memory Issues... (Easier to read version !)

tutu lamotte tutulamotte at yahoo.com
Thu Sep 18 09:29:50 EDT 2003


Dear list! 

<< I attached the Call Stack trace on a seperated .txt
file so that it can be easier to read. >>

We are currently tracking the memory usage of our
application made on top of VTK.

We discovered that using VTK instead of OpenGL
directly means that our application takes way too much
memory for its 3D display needs.

We just find out that a lot of memory seams to be
wasted like in this case when calling “Render” on a
vtkLODActor instance.

See Call Stack attached file ...

If the geometry is a simple low resolution Cylinder,
this Render can generate an allocation of up to 15K
!!! 

The way this vtkIdTypeArray::ResizeAndExtend function
works seams to be on a recursive pattern where the
memory allocation size is not determined based on the
need but by the double of the previously allocated
size.

For instance, on the first call, the size is 1. If
this isn’t enough (Which is always the case of course)
ResizeAndExtend is recalled with size 1 but will
generate an allocation of 1 + what is already
allocated. This becomes 2. And so on in a square
progression.

THE QUESTION:

Is there a way we can reclaim the unused memory
allocated through this mechanism? 



__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CallStack.txt
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030918/a24fe8c5/attachment.txt>


More information about the vtkusers mailing list