SetMemoryThresholds method (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

int SetMemoryThresholds(int nTiledThreshold, int nMaxConvSize, int nTileSize, int nConvTiles, int nConvBuffers, unsigned uFlags);

Delphi Syntax

Function SetMemoryThresholds(nTiledThreshold: L_INT; nMaxConvSize: L_INT; nTileSize: L_INT; nConvTiles: L_INT; nConvBuffers: L_INT; uFlags: L_UINT ): L_INT;

Overview

Refer to Memory Storage Types for Bitmaps

Remarks

Sets the memory restrictions for allocating bitmaps.

These are global settings and apply to the current thread. They will apply to bitmaps created in this thread after this method is called.

As an example, suppose an image needs 150 tiles and

nConvTiles  = -30
nConvBuffers = -50

In this case, there are 30% conventional memory tiles (30% of 150 = 45) and 70% disk tiles (70% of 150 = 105).

For the 105 disk tiles, there are enough cache buffers for 50% of them.

50% of 105 = 52

Therefore, 52 memory buffers will be used to cache the 105 disk tiles.

See Also

Elements:

GetMemoryThresholds method, GetMemoryInfo method

Topic:

Raster Images: Creating and Deleting Images