From: whiskers on
So I have a command line image processing program (Visual Studio 2008)
that crashes with a "This application has requested the Runtime to
terminate it in an unusual way" error. The event log reports something
like "Not enough storage is available to process this command"

The program uses OpenCV to load the images (pretty large ones) and
then does some processing on those images. It crashes when the task
manager is reporting memory usage at ~1,700mb and virtual memory also
at ~1,700mb (so ~3.4Gb total). It's always about the same numbers, no
matter what other programs are running. This happens when processing 4
or more images at once, but does not happen when running two copies of
the program processing 2 images each. I also tried running the program
on 64-bit XP to check whether this is a 4Gb-RAM limitation, but the
program crashed as well (on trying to allocate memory in std:alloc).
What bugs me is that during testing I got the page file usage climb up
to over 5 Gb - and I thought 32-bit Windows couldn't use more than 3.5
(allowing for other addresses)?

How do I troubleshoot something like this? I was convinced it's the
4Gb-RAM limitation until I ran it on a 64-bit Windows XP.
From: user923005 on
On Jun 30, 7:15 am, whiskers <whisk...(a)mail.ru> wrote:
> So I have a command line image processing program (Visual Studio 2008)
> that crashes with a "This application has requested the Runtime to
> terminate it in an unusual way" error. The event log reports something
> like "Not enough storage is available to process this command"
>
> The program uses OpenCV to load the images (pretty large ones) and
> then does some processing on those images. It crashes when the task
> manager is reporting memory usage at ~1,700mb and virtual memory also
> at ~1,700mb (so ~3.4Gb total). It's always about the same numbers, no
> matter what other programs are running. This happens when processing 4
> or more images at once, but does not happen when running two copies of
> the program processing 2 images each. I also tried running the program
> on 64-bit XP to check whether this is a 4Gb-RAM limitation, but the
> program crashed as well (on trying to allocate memory in std:alloc).
> What bugs me is that during testing I got the page file usage climb up
> to over 5 Gb - and I thought 32-bit Windows couldn't use more than 3.5
> (allowing for other addresses)?
>
> How do I troubleshoot something like this? I was convinced it's the
> 4Gb-RAM limitation until I ran it on a 64-bit Windows XP.

Any single process has a limit of 2 GB on 32 bit windows
Running the program on the 64 bit OS won't make a lick of difference
unless you recompile it as a 64 bit application.