Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Blinker 5.10 Online Reference - <b> caching of overlays</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Caching of overlays
------------------------------------------------------------------------------
 When enabled, the overlay cache gives a boost in performance to overlaid
 programs by saving discarded overlays to expanded or extended memory. This
 allows them to be reloaded much more quickly than if they had to be read
 from disk.

 During the execution of the program, the overlay manager will often need to
 discard an overlay in order to make room in the overlay area for another.
 Without the overlay cache, Blinker simply discards the least recently used
 overlay(s) and loads the new overlay into the newly freed memory. When the
 cache is enabled, rather than discarding the overlays, the overlay manager
 copies them into the cache memory. When the cache becomes full, the least
 recently used overlays are discarded from the cache, to make room for the
 new ones.

 The Blinker overlay cache requires either an EMS 4.0 (or higher) expanded
 memory manager, or XMS 2.0 (or higher) extended memory manager and can be
 requested by the addition of one of the following commands:

 BLINKER CACHE XMS x[%] [,y[%]]

 and/or

 BLINKER CACHE EMS x[%] [,y[%]]

 The first parameter is the desired size of the cache, either in kilobytes or
 as a percentage of available memory. The second parameter is the amount of
 memory to leave free, also specifiable either as an absolute number of
 kilobytes or as a percentage, and will override the value in the first
 parameter. For example, to allocate a 256 Kb cache in EMS, but leave half of
 the available EMS free:

 BLINKER CACHE EMS 256,50%

 If, for example, one megabyte of EMS was available, then a 256 Kb cache
 would be allocated. But if only 368 Kb were available, only 184 Kb would be
 allocated (368 Kb * 50%).
 It is advisable to specify both EMS and XMS caches in the link script. If
 both types of memory are available to the program, then Blinker will default
 to the use of XMS. Thus Blinker will make the best use of available
 resources for its caching. Note that if either or both kinds of memory are
 unavailable at program runtime then Blinker will simply ignore the cache
 request(s).

 Please note: Blinker's overlay caching is simply a method for improving the
 runtime speed of an application. By itself it will not reduce the memory
 requirements of the application in any way; however, with a sufficient
 cache, the OVERLAY OPSIZE of a program may be reduced to its minimum value
 with only a very slight loss in speed.

 Optimum cache size

 Ideally the cache size should be large enough to accommodate all the
 overlaid modules in the .EXE. This way, if the program is run long enough,
 eventually all the overlays will be in memory and the program will run at
 optimum speed.

 The easiest way to achieve this is to specify a cache size greater than the
 combined size of all a program's overlays. This size can be obtained from
 the output of the MAP command under the heading "Overlays". The value marked
 "total" is the total size of all Blinker-managed overlays, and the maximum
 cache size. Blinker will never allocate a cache which is larger than that
 combined size, even when prompted to do so.

 A cache size of 256 Kb is adequate for most programs, although larger cache
 sizes, up to a given program's maximum, will provide increasing benefits.
 Note: Memory is allocated to the Blinker overlay cache before the main
 program receives control.

 CA-Clipper 5.x

 When allocating an overlay cache for use with a CA-Clipper 5.x program, the
 cache only improves the runtime speed of overlays managed by the Blinker
 overlay manager. When linking a CA-Clipper 5.x program with incremental
 linking turned off, all CA-Clipper code is overlaid by the CA-Clipper paging
 system, so the Blinker overlay manager only overlays the C and ASM code in
 the program.

 When setting up a Blinker cache, make sure that enough EMS will be left free
 for the VMM's use. Otherwise the cache will detract from the VMM's supply,
 and adversely affect its performance. A typical CA-Clipper program will
 require 500 Kb to one megabyte of EMS for the VMM to efficiently manage the
 program and its data.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson