View DOSKEY Memory Allocation in MS-DOS 6.22
In MS-DOS 6.22, monitoring memory allocation for Terminate-and-Stay-Resident (TSR) utilities like DOSKEY is essential for maximizing conventional memory. This guide explains the exact command-line switch used to inspect the memory space consumed by DOSKEY, details the output provided by the operating system, and clarifies how DOSKEY's internal memory buffer functions.
The Memory Allocation Command Switch
The DOSKEY executable itself does not feature an
internal command-line switch to output its current memory usage.
Instead, MS-DOS 6.22 uses the MEM utility to inspect memory
segments allocated to specific programs.
To display the current memory allocated to DOSKEY, use the
/M (or /MODULE) switch with the
MEM command:
MEM /M DOSKEY
or
MEM /MODULE DOSKEY
What MEM /M DOSKEY
Displays
Running this command displays detailed technical information regarding the memory DOSKEY currently occupies:
- Segment Address: The starting hexadecimal address of the memory block DOSKEY occupies in conventional or Upper Memory Blocks (UMBs).
- Region Number: Indicates whether the program
resides in conventional memory or a specific upper memory region when
loaded with
DEVICEHIGHorLOADHIGH. - Memory Allocated: The total size in bytes consumed by the driver and its internal structures.
- Memory Type: Classifies the block (such as Program or Data).
Under typical operation, DOSKEY requires approximately 3 to 4 KB of memory depending on the buffer configuration.
DOSKEY Internal Buffer Allocation
While MEM /M reports the total system memory assigned to
the DOSKEY executable, DOSKEY manages its own internal history and macro
buffer via its initialization switch:
/BUFSIZE=<size>: Allocates the size in bytes for the command history and macro storage (default is 512 bytes).
To view the current stored content residing inside DOSKEY's allocated buffer:
DOSKEY /HISTORY(or/H): Displays all stored command lines.DOSKEY /MACROS(or/M): Displays all active command macros.