2.2.7 System Resources Stress-Testing Functions

The stress-testing functions artificially consume system resources. This makes it possible for you to see how your application behaves in low-resource conditions. This library was designed to make testing easier and more realistic.

Following are the new stress-testing functions:

Function Description

AllocDiskSpace Creates a file so that all but a specified amount of disk space is allocated.
AllocFileHandles Creates files so that all but a specified number of file handles are allocated.
AllocGDIMem Allocates all available memory in the graphics device interface (GDI) heap, down to a specified memory-object size.
AllocMem Allocates all available memory, down to a specified memory-object size.
AllocUserMem Allocates all available memory in the USER heap, down to a specified memory-object size.
FreeAllGDIMem Frees memory allocated by the AllocGDIMem function.
FreeAllMem Frees all memory allocated by the AllocMem function.
FreeAllUserMem Frees memory allocated by the AllocUserMem function.
UnAllocDiskSpace Deletes the file created by the AllocDiskSpace function.
UnAllocFileHandles Frees all file handles allocated by the AllocFileHandles function.

The stress testing feature depends on the dynamic-link library STRESS.DLL. This is a redistributable library.