Bcc's -CX option

Posted by on in Blogs
Ever run into an "out of memory" error in BCB during a compile, or ran into an "Internal Compiler Error" which seems to be related to source file size?  We've added a compiler option -CX where you can specify how much memory to reserve for SAVE_MEM (that's the memory which is reserved for use by the pre-compiled headers and other relocatable entities).  Use -CXn where the amount to reserve is (n * 0x100000) bytes.  The default (and minimum) setting is 64.  The maximum is 512.  The option can be set in the IDE via "Additional options to pass to the compiler".

Since the address space is shared with the IDE, you don't want to set the value higher than necessary.  Finally, no matter how much space you reserve, you can always run out of memory.


Dawn's theorem of BCC memory usage:
Let M = amount of memory reserved for compiler.
Let S = source file.
For each M, we can find an S such that bcc32 -CXM S results in an ICE.
Proof: left to the BCB user as an excercise.
QED.


:-)
Tags: C_Builder
Comments are not available for public users. Please login first to view / add comments.