Technical Notes Database
TN181D.txt OUT OF MEMORY ERROR
Category :Pascal
Platform :All
Product :Turbo Pascal 4.0+
Description:
Q. How do I avoid an Out of Memory error?
A. This error occurs when the compiler has run out of memory.
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:29 PM
Last Modified: 01-SEP-99