home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
caway349.zip
/
BIN
/
WATSWAP.ZIP
/
README.TXT
< prev
next >
Wrap
Text File
|
1995-08-18
|
1KB
|
30 lines
CWSWAP is a linkable function contained in CWSWAPR.OBJ
(register-based calling convention) and CWSWAPS.OBJ (stack-based
calling convention) which offers conventional memory swap
functionality. All but 12-20K of the conventional memory image
is swapped out to disk when the routine is called, temporarily
freed, and then reallocated and reloaded upon return from the
CWSWAP routine.
This routine is useful for two situations: First, it is ideal
for situations where spawn()'ing does not leave enough a large
enough conventional memory footprint for real mode applications
and you need the largest possible amount of free conventional
memory.
Second, CWSWAP will free up conventional memory even if extended
memory has been exhausted and the DOS extender is using
conventional memory to supply memory allocation requests or to
load part of the program image.
Do NOT use CWSWAP to load a TSR application, as the leftover TSR
will cause major problems due to the conventional memory
allocation image changing and then being overwritten by the
CWSWAP restore action.
CWSWAP will only work in conjunction with the CauseWay DOS
extender.
See SWAPDEMO.C for the proper prototypes and use of the CWSWAP
function. DEMO.BAT demonstrates use of the CWSWAPper routines.