PWB Extensions Help (ext.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Virtual Memory (VM) Functions
◄Up► ◄Contents► ◄Index► ◄Back►
─────PWB Extensions─────────────────────────────────────────────────────────
Syntax: void fpbToVM( char far *fpb, long va, unsigned count );
long VMAlloc( long count );
void VMFree ( long vm );
void VMTofpb( long va, char far *fpb, unsigned count );
long VMSize ( long vm );
Returns: VMAlloc returns a virtual address.
VMSize returns the size in bytes of a memory block in VM.
See: Falloc, Fdalloc
The virtual-memory functions allocate and manage virtual memory.
Unlike normal memory, virtual memory is not limited to 64K blocks.
If there is insufficient actual memory, portions of virtual memory
are automatically swapped to disk. Virtual memory is used for
handling very large blocks of data, such as help files.
VMAlloc allocates virtual memory. The <count> specifies the number
of bytes allocated. The value returned is the start of the
allocated virtual memory. Allocated blocks must be accessed as
offsets from this value.
The fpbToVM function copies a sequence of bytes into virtual memory
from <fpb>, a far pointer to a buffer of data. Normally the buffer
is a block of memory allocated with Falloc, although static memory
can also be used. The <va>, virtual address, is the offset of the
virtual memory block to which the data is copied. The <count> is
the length in bytes of the copied block.
VMTofpb copies bytes from virtual memory to a <fpb>, a far pointer
to a destination buffer. The <va>, virtual address, is the offset
of the virtual memory block from which the data is copied. The
<count> is the length in bytes of the copied block.
VMFree frees a <vm>, virtual memory, previously allocated by
VMAlloc.
VMSize returns the size of a virtual memory block.
-♦-