Technical Notes Database TN251D.txt Out of Memory during compilation Category :Pascal Platform :All Product :Turbo Pascal 5.5 Description: Q. What do I do about running out of memory during compilation? A. There are a number of solutions to this problem: 1. If Compiler/Destination is set to Memory, set it to Disk in the integrated environment. 2. If Options/Compile/Link buffer in the integrated environment is set to Memory, set it to Disk. Alternatively, if you're using 4.0, place a {$L-} directive at the beginning of your program. Use the /L option to link to disk in the command-line compiler. 3. If you are using any memory-resident utilities, such as Sidekick and Superkey, remove them from memory. 4. If you are using TURBO.EXE, try using TPC.EXE instead - it takes up less memory. 5. Turn off any compiler directives which are not necessarily needed. By simply turning off range checking {$R-} and software emulation {$E-}, your code size will be reduced dramatically. 6. Move all units, except PRINTER.TPU, out of the TURBO.TPL file and into the installed units directory. If none of these suggestions help, your program or unit may simply be too large to compile in the amount of memory available, and you may have to break in into two or more smaller units. Alternatively, if you're using 5.0+, you should consider using overlays. Reference: 7/16/98 4:35:30 PM
Last Modified: 01-SEP-99