Watch, Follow, &
Connect with Us

Dawn Perchik

Bcc’s -CX option

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 * 0×100000) 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.

:-)

Posted by dperchik on January 20th, 2010 under C_Builder, Uncategorized |


Leave a Comment

You must be logged in to post a comment.



Server Response from: BLOGS1