[Insight-users] Getting "Cannot allocate memory" when compiling Modules/ITKReview

pmon mail pmon.mail at gmail.com
Mon Feb 27 06:54:14 EST 2012


For the logs...

I have just seen that this problem also causes builds to fail on dashboard
also.

It turned out that every cxx which includes "*
bin/Wrapping/Typedefs/ITKReviewExplicit.h*" causing this failure.

I see that this is a general include file which by itself includes many
others. I have patched all cxx files which are including this header to
include the specifically needed headers one by one instead of this huge
one.
This has solved me the problem and wrapping has been compiled successfully
and it seems to be working.

The question is whether:
a. is this valid solution?
b. if yes, how can I share it?

thx,
PMon



On Wed, Feb 22, 2012 at 3:37 PM, pmon mail <pmon.mail at gmail.com> wrote:

> Hi
>
> I'm compiling ITK on XUbuntu x86 32bit (3Gb RAM and 3Gb swap) with gcc.
>
> When the compilation gets to the sources in *InsightToolkit-4.0.0/bin/Wrapping/Modules/ITKReview
> *g++ stops working and sends the following error to the output: "*virtual
> memory exhausted: Cannot allocate memory".*
> *
> *
> No need to say that the system monitoring utilities are indeed showing
> that the memory is exhausted.
> *
> *
> Is there anyone who has seen the phenomenon? Or knows how to deal with it?
> Does it only compile with gcc on x86-64?
>
> Thanks
> PMon
>
> p.s.: in addition to that, when I have been investigated this issue, I
> have ran the compiler in preprocessing mode (-E) to see of the C
> preprocessor is dying or the compiler and it turned out the that
> pre-processed source file is bigger than 500 Mb! Is this normal?
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120227/c47dc9ac/attachment.htm>


More information about the Insight-users mailing list