[vtkusers] Realloc failing in vtkDataArrayTemplate

Sean McBride sean at rogue-research.com
Tue Apr 10 11:44:45 EDT 2007


On 4/6/07 11:38 AM, Pankaj Chaudhari said:

>While using vtkStreamer, I am getting following error on Update
>
>ERROR: In ../Common/vtkDataArrayTemplate.txx, line 255 Unable to
>allocate 98302204 elements of size 4 bytes. 
>
>I tried to debug this problem and found that "realloc" function is
>failing to allocate those many bytes even when plenty of swap space is
>remaining (but no main memory).
>
>Does anyone has any clue about why realloc fails even if swap space is
>available? Is there any solution to get around this problem(besides
>putting more RAM :) ?.

More RAM is unlikely to help.  You don't say which OS you are using, but
assuming it is not ancient, the issue is how much virtual memory is
available to your process.  If you are using a unix-flavour, you might
look at 'top' to see how much virtual memory your process is using.  Is
your process 32-bit?  If so, you can probably use only about 3 GB of
virtual memory, I suspect you are close to that limit.  If so, you need
to reduce your process' memory usage, or use a 64-bit process.

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada





More information about the vtkusers mailing list