Have a Question?

00048: Memory usage in called programs


Memory usage in called programs


Called programs use memory that is available outside the BBx workspace, i.e., available system memory. Aside from variables, and a small control block of information on the called program itself, the called program does not use the memory allocated to the workspace via the -m parameter on startup or using a START verb. 

The basic memory allocation for called programs is the same on all ports. The DOS (non 386) ports have problems with the total memory available and so may be limited as to how many called programs can be ADDRed at once. Normally there will be enough available memory on the system for the Unix, DOS 386, Novell 386 and Windows ports to load a lot of public programs! 

All memory allocated using the DOS 286 ports comes from conventional memory. The -p just sets up a separate area of workspace to handle the program. This, along with -m allows an effective workspace size of 128k as opposed to 64 in earlier versions. It still all comes out of conventional memory. Also the -p des not affect called programs, other than if the workspace is too large, then there might not be room for called programs. 

The called program can ADDRed (add resident), which means it stays in memory until it is DROPped or the BBx task is terminated. A called program that is not ADDRed is loaded into system memory and automatically dropped when it exits. 

The amount of memory used is the size of the program plus some additional overhead for managing the called program. 

When variables are allocated they are allocated in the main workspace’s variable table and segregated from the other variables. It is possible to overflow the main workspace by filling it with variables from the called program. 

Last Modified: 12/18/1997 Product: PRO/5 Operating System: All platforms

BASIS structures five components of their technology into the BBx Generations.

Table of Contents
Scroll to Top