Borland C++ reference

_ovrbuffer

raw OCR global variable

Change the size of the overlay buffer.

Defined in header <dos.h>

Syntax

unsigned  _ovrbuffer = size;

Remarks

The default overlay buffer size is twice the size of the largest overlay. This is adequate for some applications. But imagine that a particular function of a program is implemented through many modules, each of which is overlaid. If the total size of those modules is larger than the overlay buffer, a substantial amount of swapping will occur if the modules make frequent calls to each other.

The solution is to increase the size of the overlay buffer so that enough memory is available at any given time to contain all overlays that make frequent calls to each other. You can do this by setting the _ovrbuffer global variable to the required size in paragraphs. For example, to set the overlay buffer to 128K, include the following statement in your code:

unsigned _ovrbuffer = 0x2000;

There is no general formula for determining the ideal overlay buffer size. Borland's Turbo Profiler can help provide a suitable value.

See also

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.

Extraction notes

  • heading `ovrbuffer` read as `_ovrbuffer`