LONG SetSwapAreaSize(rsSize)
This function increases the amount of memory that an application uses for its code segments. The maximum amount of memory available is one-half of the space remaining after Windows is loaded.
Parameter | Type/Description |
rsSize | WORD Specifies the number of 16-byte paragraphs requested by the application for use as a code segment. |
The low-order word of the return value specifies the number of paragraphs obtained for use as a code segment space (or the current size if rsSize is zero); the high-order word specifies the maximum size available.
If rsSize specifies a size larger than is available, this function sets the size to the available amount.
Once memory has been dedicated for use as code segment space, an application cannot use it as a data segment by calling the GlobalAlloc function.
Calling this function improves an application's performance by helping prevent thrashing. However, it reduces the amount of memory available for data objects and can reduce the performance of other applications. Before calling SetSwapAreaSize, an application should call GetNumTasks to determine how many other tasks are running.