BASIC statement calculations

The amount of shared memory that D3 requires for FlashBASIC operations can be modified by changing the BASIC statement value in the D3 configuration file.

About this task

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 can be omitted. The maximum size is 32 MB.

We recommend that you set to 0 because:

  • Memory is generally no longer a restriction on a machine and this was a way to make better use of the available memory.
  • The FlashBASIC code will run in local space to the process, which means that replacing cached object code is simpler. In addition, if there was an issue, it would only affect that process, whereas if there was an issue with the shared memory, it could affect all D3 processes running FlashBASIC code.

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 the following 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.

    You will see a screen similar to:

     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 described previously.
    • Change the values in the D3 configuration file accordingly.