|
|
Microsoft OS/2 SDK 2.0 05-30-1990
VMM Description
---------------
This application demonstrates some of the basic components
of the new memory API for OS/2 2.0. Using the
system-defined page size of 4096 bytes, this application
gives the developer a visual representation of what is
happening inside the machine when they use the API's.
It is written with the following objective:
To demonstrate the use of the basic memory management
API's available to developers in OS/2 2.0. This is done
with the use of visual aid in the form of pages on the
screen with their attributes included.
To use the VMM application, the user must issue the "VMM"
command at the screen prompt.
The user is presented with a blank screen, with the
exception of the menus. To use VMM, the user must first
select "Allocate" from the VMM menu. This will allow the
user to allocate "n" bytes of memory (decimal) and set
the appropriate attributes for the memory that they wish
to allocate. Each allocation is rounded up (by the
system) to the next page size (4096 bytes per page), and
that many pages are allocated to the user.
After allocating memory, the user can commit (if not
already committed) or decommit the memory using the "Set
Memory Attributes" menu selection. Pages that are
displayed in green are committed, while those displayed in
red are not.
Other attributes (such as read, write, execute, and guard
page) may also be set for committed pages using the "Set
Memory Attributes" menu selection.
For committed pages with the write capability set, the
user may put text into the memory bytes using the "Write
Memory" menu selection. The user simply enters the
address (hexadecimal) and the text they wish to write
into memory.
To read the data stored in a particular memory location,
use the "Read" command and enter the corresponding address
into the dialog box entry field. Data will be read from
the memory location specified up to the first null
character. The data is displayed in a dialog box.
To free up memory, the user needs to choose "Free Memory"
from the menu. The address of a base page is the only
address that is allowed to be freed. Any freeing of a
non-base address will result in an "invalid address"
error message.
APIs FEATURED:
DosAllocMem
DosError
DosFreeMem
DosQueryMem
DosSetExceptionHandler
DosSetMem
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.