|
From: Edward D. <eld...@tr...> - 2014-12-25 05:51:32
|
On 12/24/2014 2:40 AM, Edward Diener wrote: > I am seeing an out of memory message of: > > "cc1plus.exe: out of memory allocating 65536 bytes" > > when compiling code using mingw and gcc-4.8.1-4. > > Strangely this error does not occur when compiling the exact same code > using versions from mingw of gcc-4.3.0 through gcc-4.7.2. > > Also relevant, although possibly not helpful to this mailing list, is > that the same code fails with mingw-64 and its versions of gcc-4.8.1, > gcc-4.8.2, gcc-4.8.3, gcc-4.9.0, and gcc-4.9.1. > > The code is heavily preprocessor code for my VMD library, which also > depends on the Boost PP library. In other words the code is almost > entirely involved with testing macro expansions in the library. As a > piece of related information, which may not be very relevant, the latest > clang and versions of vc++ from vc++8 through vc++12 do not exhibit any > out of memory errors. > > It seems gcc has regressed in some way with version 4.8.1 in > its handling of memory allocation. Is this a known problem with with > this gcc release ? Is anyone involved with gcc trying to fix > the problem if it is known ? Or might this just be a problem in Windows > with the mingw implementation of gcc ? > > The code in question is highly complicated, as befits an advanced macro > programming library like VMD, so it would be very difficult to reproduce > it in some simpler form. But the fact that it occurs in the latest > version of mingw gcc-4 but not in the earlier versions suggests > something that has been done wrong and might already be known about. > > I am compiling under Windows 7 Ultimate with 8 GB of real memory, so I > do not think this has anything to do with my hardware itself. To let anyone interested know, my problem was solved by using the -ftrack-macro-expansion=0 compiler switch. The issue is mentioned at this bug report https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56746. |