Public Member Functions

IBitmapPager Class Reference

This reference page is linked to from the following overview topics: Incremental Improvements.


Search for all occurrences

Detailed Description

See also:
Class IBitmapPager
Description:
This class exposes parameters to the Bitmap Pager. This pager reduces memory footprint by swapping bitmap data to and from disk, keeping the memory usage of bitmaps within a certain percentage of total available memory. Internally, all bitmaps are partitioned into separately allocated tiles, but tiles are only swapped to disk when the pager is enabled. For performance reasons the tile size varies dynamically for each bitmap, but is typically around 1-4 megabytes. Bitmaps smaller than one tile are not eligible for paging, and are held in memory at all times.

#include <bitmap.h>

Inheritance diagram for IBitmapPager:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  DECLARE_DESCRIPTOR (IBitmapPager)
virtual BOOL  IsPagerEnabled ()=0
  Returns whether bitmap paging is enabled.
virtual void  SetPagerEnabled (BOOL b)=0
  Enables or disables bitmap paging.
virtual const MCHAR *  GetPageFilePath ()=0
  Returns the page file path.
virtual void  SetPageFilePath (const MCHAR *path)=0
  Sets the page file path.
virtual float  GetMemoryLimitPercent ()=0
  Returns the memory limit percentage (as a fraction from 0.0 to 1.0) of available padded memory.
virtual void  SetMemoryLimitPercent (float percent)=0
  Sets the memory limit percentage (as a fraction from 0.0 to 1.0) of available padded memory.
virtual float  GetMemoryPaddingPercent ()=0
  Returns the memory padding percent (as a fraction from 0.0 to 1.0) of available memory.
virtual void  SetMemoryPaddingPercent (float percent)=0
  Sets the memory padding percent (as a fraction from 0.0 to 1.0) of available memory.
virtual BOOL  GetMemoryLimitAutoMode ()=0
  Returns whether Memory Limit Auto Mode is enabled for the pager.
virtual void  SetMemoryLimitAutoMode (BOOL onOff)=0
  Sets whether Memory Limit Auto Mode is enabled for the pager.
virtual size_t  GetMemoryLimit ()=0
  Returns the current memory limit physical value, in bytes.
virtual size_t  GetMemoryUsedForPager ()=0
  Returns the total memory usage of bitmap tiles (excluding tiles on disk), in bytes.
virtual size_t  GetMemoryPadding ()=0
  Returns the current memory padding physical value, in bytes.
virtual size_t  GetMemoryAvailablePadded ()=0
  Returns the amount of available memory for the entire application, after padding, in bytes.
virtual LONGLONG  GetMemoryTotalForPager ()=0
  Returns the total memory and disk usage of bitmap tiles, in bytes.

Member Function Documentation

DECLARE_DESCRIPTOR ( IBitmapPager  )
virtual BOOL IsPagerEnabled ( ) [pure virtual]

Returns whether bitmap paging is enabled.

Internally, all bitmaps are partitioned into separately allocated tiles. With paging is enabled, bitmap tiles are swapped to disk, keeping total bitmap usage below the memory limit.

virtual void SetPagerEnabled ( BOOL  b ) [pure virtual]

Enables or disables bitmap paging.

Internally, all bitmaps are partitioned into separately allocated tiles. Passing TRUE immediately swaps bitmap tiles from memory to disk, reducing total bitmap usage below the memory limit. Passing FALSE does not immediately swap bitmap tiles from disk to memory, but no further tiles are swapped to disk while paging is disabled.

virtual size_t GetMemoryLimit ( ) [pure virtual]

Returns the current memory limit physical value, in bytes.

This is the value used internally in deciding whether to swap bitmap tiles to disk. The value is not live, but is calculated from the memory limit percentage at specific times, during file load, file reset, render begin and render end.

virtual size_t GetMemoryUsedForPager ( ) [pure virtual]

Returns the total memory usage of bitmap tiles (excluding tiles on disk), in bytes.

virtual size_t GetMemoryPadding ( ) [pure virtual]

Returns the current memory padding physical value, in bytes.

virtual size_t GetMemoryAvailablePadded ( ) [pure virtual]

Returns the amount of available memory for the entire application, after padding, in bytes.

virtual LONGLONG GetMemoryTotalForPager ( ) [pure virtual]

Returns the total memory and disk usage of bitmap tiles, in bytes.

May exceed 2GB.


IBitmapPager IBitmapPager IBitmapPager IBitmapPager IBitmapPager IBitmapPager IBitmapPager IBitmapPager IBitmapPager IBitmapPager
IBitmapPager IBitmapPager IBitmapPager IBitmapPager IBitmapPager IBitmapPager IBitmapPager IBitmapPager IBitmapPager IBitmapPager