9.6 Allocating Memory: The Alloc Menu

The Alloc menu is useful for allocating memory for test purposes. You can allocate all free memory and then run your program to see how it behaves when no memory is available. You can free all or a specified part of the allocated memory.

The following commands are available from the Alloc menu:

Command Action

Allocate All of Memory Allocates all free memory. This command is useful for testing out-of-memory conditions in applications.
Free All Frees memory allocated by the Allocate All of Memory command.
Free 1K Frees 1K of the memory allocated by the Allocate All of Memory command.
Free 2K Frees 2K of the memory allocated by the Allocate All of Memory command.
Free 5K Frees 5K of the memory allocated by the Allocate All of Memory command.
Free 10K Frees 10K of the memory allocated by the Allocate All of Memory command.
Free 25K Frees 25K of the memory allocated by the Allocate All of Memory command.
Free 50K Frees 50K of the memory allocated by the Allocate All of Memory command.
Free XK Frees a specified number of kilobytes of the memory allocated by the Allocate All of Memory command. A dialog box is displayed, in which you can specify the number.

The last eight commands apply only to memory allocated when you chose the first command—it is not possible to free memory allocated by another program.