community.borland.com

Article #16299: TP6 IDE Memory Documentation

 Technical Notes Database

TN1299D.txt   TP6 IDE Memory Documentation
Category   :Pascal
Platform    :All
Product    :Turbo Pascal  6.0

Description:

Subject:  TP6 IDE memory doc
 

Both the IDE and Turbo Pascal's itself are very configurable and
there are several steps you can take to make more workspace
available for compiling and debugging your programs. Some
solutions are easy to implement, while others involve altering
your code or turning off debug information selectively. Always
start with the options that are painless and safe and then, if
necessary, take progressively more radical steps in order to
increase the IDE's capacity. Once you find a system configuration
that provides you with enough capacity, you might want to
permanently modify the your AUTOEXEC.BAT, CONFIG.SYS, and
TURBO.TP, and TURBO.EXE files.

SCAN ITEM:
Changes you make in the Options|Environment|Startup dialog box
are saved directly into TURBO.EXE and are permanent. Changes you
make in other dialog settings inside the IDE can be saved in a
TURBO.TP configuration file. For more information, refer to the
IDE Reference Chapter xxxx.

Outside the IDE
---------------
x.  Remove TSRs from memory. If you have Sidekick or Superkey
    loaded in memory or EMS, exit the IDE, remove them, and then
    reload TURBO.EXE.

x.  Modify CONFIG.SYS to remove unnecessary drivers (ANSI.SYS,
    disk caches, etc.). You can also reduce the number of files
    and buffers to: FILES = 20, BUFFERS = 20. Make sure these
    changes are safe for other software you are using.

Re-configuring Turbo Pascal
---------------------------
x.  Set Compile|Destination to Disk.

x.  On the Options|Linker dialog box, set Link Buffer to Disk.

x.  Using the Options|Environment|Startup menu, try one or more of
    the following:

SCAN ITEM:
There are command-line parameters that you can pass to TURBO.EXE
at startup that correspond to all of the settings on the
Options|Environment|Startup menu. Refer to P-xxx.

    x.  If you have expanded memory on your system (EMS), make
        sure the Use e(x)panded memory option is enabled and make
        plenty of EMS available to Turbo Pascal (by reducing the
        amount of EMS being used by resident programs or drivers
        like RAM disks, Sidekick, etc.). The IDE can use at least
        400K of EMS for overlays, extra buffers, and other system
        resources. All these will increase the workspace for your
        programs. (Making more than 400K EMS available will
        increase the IDE's performance, although it will not make
        more memory available to compile and debug your
        programs.)

SCAN ITEM:
If you have EMS available, disabling this option will have no
effect on IDE capacity.

   x.  If you're not trying to debug a graphics program, make
       sure the (G)raphics screen save option is disabled. Like
       all startup options, you can enable this option on the
       command-line when you do need to debug a graphics program.

   x.  Reduce the default (O)verlay and (W)indow heap sizes.
       Every Kbyte you subtract here yields another KByte for
       your program. If you have EMS available, reducing these
       heap sizes somewhat won't have much negative impact on the
       IDE's performance.

   x.  Disable the Load (T)URBO.TPL option. TURBO.TPL contains
       the commonly used standard units and is loaded into memory
       at startup to optimize linker performance. By disabling
       this option, you'll still be able to compile and debug
       programs, but you'll have to extract all the units from
       TURBO.TPL first (using the TPUMOVER utility. Refer to
       TPUMOVER.DOC on your distribution disk).

SCAN NOTE: If you don't have the IDE load TURBO.TPL, you won't be
able to evaluate expressions using the Evaluate/Modify box unless
a debugging session is active.

       As an alternative, you can leave the Load (T)URBO.TPL
       option enabled and still reduce the size of TURBO.TPL by
       about 15K. Just extract all units from TURBO.TPL with the
       exception of SYSTEM.TPU. Then delete all units from
       TURBO.TPL with the exception of SYSTEM.TPU.

SCAN ITEM:
Make sure to leave the extracted units on disk and in your unit
path (Options|Directories|Unit directory) so your programs can
still make use of the Dos, Crt, Overlay and the Printer units.

   x.  On a unit-by-unit basis, turn off debug information
       in those units that are already debugged. A common
       technique is to build a "test harness" around your code as
       you develop it. Once that code is implemented, tested and
       debugged, turn off symbol information in that unit by
       disabling the (D)ebug information switch on the
       Options|Compiler box and recompiling. You can also embed a
       {$D-} in the unit itself. If you do so, it's a good idea
       to use conditional directives and defines to control
       enabling and disabling debug information in various units
       (refer to chap xxxx). If you proceed as described here and
       end up with debug information disabled everywhere in your
       program--and are still having capacity problems--consider
       modifying your code as described below.

SCAN ITEM:
Of course, if you're not debugging, you can greatly increase IDE
capacity by disabling the Integrated debugging switch in the
Options|Debugger box.


Modifying your source code
-------------------------
Some of the following measures are easy to do and yield big
capacity gains. Others are more radical and you might want to use
conditional directives (see P-xxxx) to turn them on or off.

x.  Overlay units in your program. This is very safe, flexible,
    and can dramatically increase the IDE workspace. Refer to
    chapter xxx in the Programmer's Guide for more information.

x.  Using the Options|Memory sizes menu, reduce the (S)tack size
    and (L)ow heap limit. Make sure there's enough stack for
    your program, especially if you've turned off stack checking
    as recommended below.

x.  Using the Options|Compiler box, try one or more of the
    following:

    x.  Disable (R)ange checking and (S)tack checking. (S)tack
        checking is on by default. Turn it off once your program is
        stable and you've determined its stack requirements.

    x.  Disable (E)mulation during debugging. Of course, only
        enable emulation and (8)087/80287 code generation if
        you are doing IEEE floating point. If you have a
        numeric coprocessor on your debugging machine, disable
        emulation while you're debugging non-floating point
        code.

x.  Reduce the number of symbols in the interface sections of
    units. Don't declare something in the interface section of
    a unit unless it's used by code outside the unit. Doing this
    is good, safe programming practice and will make more symbol
    space available during the compilation of large programs.


Turbo Debugger and the IDE
--------------------------
Turbo Pascal itself and the IDE both offer many ways for you to
gain capacity by making adjustments to default settings. If you
run out memory compiling or debugging your programs and have
tried most of the painless ideas offered above, consider using
the IDE to edit and compile your programs, and then using Turbo
Debugger to debug them. If you have Turbo Debugger and want to
use it to debug programs developed in the IDE, configure the IDE
as follows:

  o Set Compile|Destination to disk.
  o In the Options|Debugger box, disable Integrated and enable
    Standalone debugging.

You can also use the command-line compiler, TPC.EXE, or the
extended memory command-line compiler, TPCX.EXE to build massive
programs (several megabytes in size). Then you can use TD, TD286
or TD386 to debug them.

11/27/90clb


Reference:


7/16/98 4:35:44 PM
 

Last Modified: 01-SEP-99