
Hi, I have a lot of boost files in a precompiled header, and compiling that precompiled header using boost 1.34.1 caused no errors. However, now that I've upgraded to 1.35, I'm getting the following error during PCH generation in MSVC9: 2>c:\it\tfs\crusades\sdks\boost\boost\filesystem\operations.hpp(827) : error C3859: virtual memory range for PCH exceeded; please recompile with a command line option of '-Zm112' or greater 2>c:\it\tfs\crusades\sdks\boost\boost\filesystem\operations.hpp(827) : fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit The recommended fix in the error text resolves the problem, but I'm wondering why this is a problem in the first place. As I stated before, the earlier versions of boost never did this. Is this a bug?

Robert Dailey wrote:
2>c:\it\tfs\crusades\sdks\boost\boost\filesystem\operations.hpp(827) : error C3859: virtual memory range for PCH exceeded; please recompile with a command line option of '-Zm112' or greater
The recommended fix in the error text resolves the problem, but I'm wondering why this is a problem in the first place. As I stated before, the earlier versions of boost never did this. Is this a bug?
As Boost grows, so do its memory requirements on the compiler. Template metaprogramming is especially heavy on memory use, because templates instantiate to hundreds, even thousands of types, all of which have a bit of typeinfo somewhere. It could be called a bug - in the same sense that being a memory hog is a bug in an application. The problem is that the execution environment of a C++ metaprogram is far less well understood than that of a regular application. Sebastian
participants (2)
-
Robert Dailey
-
Sebastian Redl