[vtkusers] Memory Issues...

tutu lamotte tutulamotte at yahoo.com
Thu Sep 18 10:15:04 EDT 2003


I attached the call stack that occur just before the
one that i sent so far.
It is this last one which generates up to 15K of
memory allocation for rendering a simple cylinder.

The other one also allocates even more memory !!


Thanks for any help !


--- tutu lamotte <tutulamotte at yahoo.com> wrote:
> 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>  ==>
extern:"_nh_malloc()" at line 194 (dbgheap.c)
> in "msvcrtd.dll"
>      ==> extern:"::operatornew(unsigned int)" at
> line 24 (new.cpp) in "msvcrtd.dll"
>      ==>
> extern:"vtkIdTypeArray::ResizeAndExtend(int)" at
> line 214 (D:\Program
>
Files\vtk40\vtk-src-windows\Common\vtkIdTypeArray.cxx)
> in "vtkcommon.dll"
>      ==> extern:"vtkIdTypeArray::Squeeze(void)" at
> line 82 (D:\Program
> Files\vtk40\vtk-src-windows\Common\vtkIdTypeArray.h)
> in "vtkcommon.dll"
>      ==> extern:"vtkCellArray::Squeeze(void)" at
> line 228 (D:\Program
> Files\vtk40\vtk-src-windows\Common\vtkCellArray.h)
> in "vtkcommon.dll"
>      ==> extern:"vtkPolyData::Squeeze(void)" at line
> 1349 (D:\Program
> Files\vtk40\vtk-src-windows\Common\vtkPolyData.cxx)
> in "vtkcommon.dll"
>      ==> extern:"vtkAppendPolyData::Execute(void)"
> at line 514 (D:\Program
>
Files\vtk40\vtk-src-windows\Graphics\vtkAppendPolyData.cxx)
> in "vtkgraphics.dll"
>      ==> extern:"vtkSource::ExecuteData(class
> vtkDataObject*)" at line 163 (D:\Program
> Files\vtk40\vtk-src-windows\Common\vtkSource.h) in
> "vtkcommon.dll"
>      ==> extern:"vtkSource::UpdateData(class
> vtkDataObject*)" at line 418 (D:\Program
> Files\vtk40\vtk-src-windows\Common\vtkSource.cxx) in
> "vtkcommon.dll"
>      ==> extern:"vtkDataObject::UpdateData(void)" at
> line 411 (D:\Program
>
Files\vtk40\vtk-src-windows\Common\vtkDataObject.cxx)
> in "vtkcommon.dll"
>      ==> extern:"vtkDataObject::Update(void)" at
> line 292 (D:\Program
>
Files\vtk40\vtk-src-windows\Common\vtkDataObject.cxx)
> in "vtkcommon.dll"
>      ==>
> extern:"vtkOpenGLPolyDataMapper::RenderPiece(class
> vtkRenderer*,class vtkActor*)" at line 154
> (D:\Program
>
Files\vtk40\vtk-src-windows\Rendering\vtkOpenGLPolyDataMapper.cxx)
> in "vtkrendering.dll"
>      ==> extern:"vtkPolyDataMapper::Render(class
> vtkRenderer*,class vtkActor*)" at line 83
> (D:\Program
>
Files\vtk40\vtk-src-windows\Rendering\vtkPolyDataMapper.cxx)
> in "vtkrendering.dll"
>      ==> extern:"vtkOpenGLActor::Render(class
> vtkRenderer*,class vtkMapper*)" at line 128
> (D:\Program
>
Files\vtk40\vtk-src-windows\Rendering\vtkOpenGLActor.cxx)
> in "vtkrendering.dll"
>      ==> extern:"vtkLODActor::Render(class
> vtkRenderer*,class vtkMapper*)" at line 205
> (D:\Program
>
Files\vtk40\vtk-src-windows\Rendering\vtkLODActor.cxx)
> in "vtkrendering.dll"
>  


__________________________________
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: CallStack2.txt
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030918/45bc71e0/attachment.txt>


More information about the vtkusers mailing list