[Insight-users] Artificial memory limit on ITK?

Mark Wyszomierski markww at gmail.com
Wed Oct 3 13:42:59 EDT 2007


Hey Bill,

I'm using windows XP, I thought it takes care of that? If not, how
could I compact the memory used by ITK?

Thanks,
Mark

On 10/3/07, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> Mark Wyszomierski wrote:
> > Hi,
> >
> > I'm using itkResampleImage in a multithreaded environment in win32. My
> > process at some point uses 902mb of memory - then each thread does a
> > resample piece like:
> >
> > void ThreadFunction()
> > {
> >     try {
> >         itkResampleImage::Update();
> >     }
> >     ....
> > }
> >
> > The first thread that calls itkResampleImage::Update() always fails
> > and the caught exception just says something along the lines of "error
> > allocating image memory". It actually fails allocating the internal
> > high resolution image buffer which is a little over 80 mb.
> >
> > This thread then fails and releases its memory down to about 700mb,
> > and all other threads that call this same function process just fine!
> >
> > Is there some internal memory cap of 1.0gb per process for
> > itkResampleImage or something like that? I can't figure why I keep
> > getting this error - the process should be able to allocate up to 2 gb
> > of memory if necessary.
> >
> It could be system memory fragmentation.   The OS may not have chunks
> big enough at
> the time of the call.
>
> -Bill
>
>


More information about the Insight-users mailing list