BASIC statement calculations

The amount of shared memory which D3 requires for FlashBASIC operations can be modified by changing the BASIC statement value in the D3 configuration file. BASIC shared memory is required only when applications are compiled with FlashBASIC. If FlashBASIC is not used, then the BASIC value is zero and this step may be omitted. The maximum size is 32 MB.

The calculation to determine the amount of required shared memory for FlashBASIC is:

BASIC = (Active FlashBASIC program size * 1.2 KB)

where an Active FlashBASIC program size is the amount of memory (in KB) used to hold all the Active FlashBASIC programs in memory at once. The definition of active here means only the programs running at the same time.

Complete these steps to determine Active FlashBASIC program size.

Procedure

  1. Start the D3 virtual machine.
  2. Start all background processes.
  3. Log on to all the active users.
  4. Issue the command shpstat.

    A similar screen displays:

    Block   Usage   Size   Name
    1       1       28k    sales,bp sales.update
    2       2       39k    inv,bp receiving
    3       1       42k    gl,bp gen.led.entry
    2   992k (free)
    Free:   992k    Max Free: 992k  Used: 109k
  5. Note the amount of Used memory.

    Experimentation indicates that typical software packages require approximately 100 to 500 KB of shared memory per application. For example, all A/R users might use 500 KB and all G/L users might use 500 KB.

    When first installing D3 or using FlashBASIC for the first time, it is difficult to determine the Active FlashBASIC program size. This parameter is determined by experimentation.

    • Install the system, and accept the default value.

    • After the system is installed and applications are running, determine the actual usage as above.

    • Change the values in the D3 configuration file accordingly.