←Select platform

MaximumConventionalMemorySize Property

Summary

The maximum number of conventional memory bytes to use when loading a single raster image object.

Syntax

C#
VB
C++
public long MaximumConventionalMemorySize {get; set;} 
Public Property MaximumConventionalMemorySize As Long 
public: 
property int64 MaximumConventionalMemorySize { 
   int64 get(); 
   void set (    int64 ); 
} 

Property Value

The maximum number in bytes of conventional memory to use when loading a single raster image object before switching to disk mode. Default value is 0 (use as much physical memory as possible).

Remarks

The appropriate setting for MaximumConventionalMemorySize depends on the system hardware configuration and the number of cores and application types being used. Change this setting if out-of-memory errors occurs when running your application.

If the RasterImage loaded by RasterCodecs is very large and is created using conventional memory, then a large amount of physical memory is used to hold this image in memory and is not available for other purposes such as OCRing, barcode reading or various other image processing. This is more noticeable in multi-threaded applications where loading several large images in conventional memory can cause out-of-memory errors, even when performing operations that normally would succeed.

Use MaximumConventionalMemorySize to set the maximum size of the image in memory allowed and RasterCodecs will automatically switches to use the disk memory feature of RasterImage (See RasterMemoryFlags.DiskMemory).

The MaximumConventionalMemorySize value is in bytes and the default value is 0, meaning try to use as much conventional memory as possible.

The special value of -1 is a special value designed for multi-thread server operations. The specific number of bytes depends on the processor(s) being used.

For x86 processors, the value is 42,187,000 (42MBytes).

For x64 processors, the value is calculated dynamically (1.7GBytes for each 8 cores, not exceeding the physical memory size).

These values allow a typical document processing application (such as OCR) to process 8 typical document sizes (8.5 by 11 inches at 300 DPI and 32-bits per pixel) to be loaded and processed in conventional memory at the same time. Anything significantly larger than that gets switched to use disk memory mode.

Different factors affect the performance of a particular setting and must be weighed. These include the following factors:

  • The speed of the machine's hard drive - increases the penalty for using disk memory rather than conventional memory

  • Load time - using disk memory consumes more time loading than using conventional memory

  • OCR Recognition and other memory heavy image processing - using disk memory improves the performance of these operations because conventional memory is freed for image processing

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Codecs Assembly