[vtkusers] unable to allocate 178MB for an array

Reza Faieghi mfaieghi at westerneng.ca
Tue Nov 15 16:38:20 EST 2016


Hello,

I am trying to extract surface of a goemetry and write it into a STL. I use

vtkSmartPointer<vtkDataSetSurfaceFilter> dsf =
vtkSmartPointer<vtkDataSetSurfaceFilter>::New();
dsf->SetInputData(ug);
dsf->Update();

But I am getting this error in vtkOutputWindow:

vtkIdTypeArray (00C30690): Unable to allocate 46656437 elements of size 4
bytes.

This is about 187MB memory; however, I can not allocate this amount of
memory on
a 12GB RAM. I believe that I must be able to allocate this chunk of memory
but for some reason it does not go through. I tried to delete every other
arrays in my program to make sure that there are not any hidden consumption
of RAM but that didnot help.

I will be grateful if anyone has any idea how to fix this.

Many thanks!
Reza
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161115/758445f7/attachment.html>


More information about the vtkusers mailing list