| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (11 out of 14)

Restricting Region 3 Memory

Since Region 3 is a cache within Region 1, preallocating Region 3 memory is a special case of preallocating Region 1 memory. Sufficient Region 3 memory is available when no Region 1 allocation messages appear during KB execution.

Region 3 exists to cache workspace and icon background images. Such images require large amounts of memory. Every time a background image is rescaled, G2 computes a new image of the appropriate size and stores it in Region 3. If Region 3 becomes full, G2 does not obtain more memory, but recycles the memory already available.

If you have many background images and/or frequently rescale them, and find that background images display too slowly, you might obtain faster display by increasing the maximum size of Region 3, thereby reducing time spent recycling and recalculating background images. To prevent run-time allocation from resulting, be sure to increase the preallocation for Region 1 accordingly.

Conversely, if your application is nearing the limits of available memory, devotes much memory to Region 3, and can accept slower background image display, reducing the size of Region 3 can free memory for other uses within Region 1, or allow its preallocation to be reduced.

G2 does not assign Region 1 memory to the Region 3 cache unless the memory is actually needed, so a Region 3 maximum need not be reduced just because it is greater than necessary. It only needs to be reduced when Region 3 is actively using more memory than is desired.

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (11 out of 14)

Copyright © 1997 Gensym Corporation, Inc.