|
|
1.1 ! root 1: VMM Description ! 2: --------------- ! 3: ! 4: This application demonstrates some of the basic components ! 5: of the new memory API for OS/2 2.0. Using the ! 6: system-defined page size of 4096 bytes, this application ! 7: gives the developer a visual representation of what is ! 8: happening inside the machine when they use the API's. ! 9: ! 10: It is written with the following objective: ! 11: ! 12: ! 13: To demonstrate the use of the basic memory management ! 14: API's available to developers in OS/2 2.0. This is done ! 15: with the use of visual aid in the form of pages on the ! 16: screen with their attributes included. ! 17: ! 18: To use the VMM application, the user must issue the "VMM" ! 19: command at the screen prompt. ! 20: ! 21: The user is presented with a blank screen, with the ! 22: exception of the menus. To use VMM, the user must first ! 23: select "Allocate" from the VMM menu. This will allow the ! 24: user to allocate "n" bytes of memory (decimal) and set ! 25: the appropriate attributes for the memory that they wish ! 26: to allocate. Each allocation is rounded up (by the ! 27: system) to the next page size (4096 bytes per page), and ! 28: that many pages are allocated to the user. ! 29: ! 30: After allocating memory, the user can commit (if not ! 31: already committed) or decommit the memory using the "Set ! 32: Memory Attributes" menu selection. Pages that are ! 33: displayed in green are committed, while those displayed in ! 34: red are not. ! 35: ! 36: Other attributes (such as read, write, execute, and guard ! 37: page) may also be set for committed pages using the "Set ! 38: Memory Attributes" menu selection. ! 39: ! 40: For committed pages with the write capability set, the ! 41: user may put text into the memory bytes using the "Write ! 42: Memory" menu selection. The user simply enters the ! 43: address (hexadecimal) and the text they wish to write ! 44: into memory. ! 45: ! 46: To read the data stored in a particular memory location, ! 47: use the "Read" command and enter the corresponding address ! 48: into the dialog box entry field. Data will be read from ! 49: the memory location specified up to the first null ! 50: character. The data is displayed in a dialog box. ! 51: ! 52: To free up memory, the user needs to choose "Free Memory" ! 53: from the menu. The address of a base page is the only ! 54: address that is allowed to be freed. Any freeing of a ! 55: non-base address will result in an "invalid address" ! 56: error message. ! 57: ! 58: APIs FEATURED: ! 59: ! 60: DosAllocMem ! 61: DosError ! 62: DosFreeMem ! 63: DosQueryMem ! 64: DosSetExceptionHandler ! 65: DosSetMem
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.