[Gdal-dev] Memory problem with ECW images

Tom Lynch tflynch at gmail.com
Wed Sep 20 21:52:18 EDT 2006


Hi Fabien,

Which version of the ECW libraries are you using?  If it's the
previous RC2, there was definitely a memory leak in that distribution,
relating to tiled views.  That bug was fixed for the current public
release.

The ECW library maintains a cache for compressed and uncompressed
blocks of frequently used imagery as views are read.  The basic method
used is to set cache size at about 1/4 of physical RAM and fill with
uncompressed blocks as they are viewed, then start to recycle cache
for compressed blocks as more imagery is viewed, on an LRU basis.  The
cache is also purged at various times, including on library shutdown.

The maximum size of the cache can be controlled using
NCSecwSetConfig(NCSCFG_CACHE_MAXMEM, <size in bytes>);

Hope this helps.  If you're seeing a bug in ECW caching please let us
know, and we'll correspond with you to locate and fix the problem.

Regards

Tom Lynch

On 9/21/06, Fabien Dachicourt <support at geoimage.fr> wrote:
> Hi,
> Our software browses large images through GDAL library, it reads images by
> blocks at any given resolution with GDALDatasetRasterIO and frees blocks
> which are out of view. It works pretty fine, it allows to control the exact
> amount of data in memory.
> However we notice some large memory consumption with ECW images, it looks
> like there is a big memory leak : all loaded tiles are stored somewhere in
> memory and never free.
> Exactly the same RGB image in TIFF format works fine, without memory
> overflow.
>
> Is it a memory leak or any hidden cache in the ECW libraries or in the ECW
> driver ? is there any way to control the size of this cache ?
>
> The GDAL cache is set to 2MB.
> The GDAL version is 1.3.2.0 (FWTools 1.0.5).
>
> Thanks in advance for any help,
> Fabien
>
>
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
>


-- 
Tom Lynch
Development, ER Mapper
Phone:      +61 8 93882900
Fax:        +61 8 93882901
Email:      tom.lynch at ermapper.com
Web:        http://www.ermapper.com
Forums:     http://forum.ermapper.com



More information about the Gdal-dev mailing list