[vtkusers] Allocation Errors

John Drescher drescherjm at gmail.com
Wed Aug 29 14:20:47 EDT 2012


On Wed, Aug 29, 2012 at 2:13 PM, Jean-Hugues Royer <jhroyer at joher.com> wrote:
> Hi,
>
> On some computers when we load DICOM images using vtkDICOMImageReader we get
> this allocation error message:
>
>
> In c:\users\davidcole\dashboards\my
> tests\activizinstallers\vtksource-prefix\src\vtksource\common\vtkDataArrayTemplate.txx,
> line 144
> vtkShortArray (06EDCFC0): Unable to allocate 166567060 elements of size 2
> bytes.
>
> or
>
> In c:\users\davidcole\dashboards\my
> tests\activizinstallers\vtksource-prefix\src\vtksource\common\vtkDataArrayTemplate.txx,
> line 144
> vtkShortArray (0C765058): Unable to allocate 184549376 elements of size 2
> bytes.
>
>
> Of course there is enough memory on the computers to allocate such a size.
>
> This can be reproduced at will on some computers while it will never happen
> on others.
>
> We are using Activiz 5.8.
>
>
> Did you already see this message ?
>
> Do you know why/how this happens ?
>

If this is a 32 bit code it could be caused by address space
fragmentation. Remember under 32 bit windows you by default get a 2GB
address space regardless of how much ram or page file you have. Inside
this 2GB address space all memory for your application is allocated
along with all of your code. Also remember that dlls specify what
address they try to load at and this can cause fragmentation because
the OS does not try to pack them all together to create 1 large free
address space.

John



More information about the vtkusers mailing list