Frank,
I agree that the amount is small per file, but in our application we need to 
keep thousands of files open, and keep memory consumption to a certain limit.
I have another question regarding the stripped file. When I open a large 
stripped file, the memory rises by almost 1 MB. I assume this is caused by some 
sort of caching. When I open hundreds of such files, the amount of memory is 
multiplied. Can I limit this amount?

Yehiyam
Sent from my mobile


-----------------------------
From: "Frank Warmerdam"
Subject: Re: [gdal-dev] Memory usage for GetProjectionRef
Date: 06 אוקטובר 2010 00:35


Livneh Yehiyam wrote:
> Hi I'm sorry if I was misunderstood, but these are not leaks I'm worried
> about, but rather I'm trying to understand the memory consumption of the
> various GDAL calls I use. I didn't notice any leak, and I trust you test for
> leaks all the time.

Livney,

We don't check for memory leaks all the time or comprehensively.  But
regular use of GeoTIFF it one of the most frequently leak tested things.

> Take for example the first two examples below. These two
> are the same image, with and without the pyramid (overviews). Why should the
> call to GetProjectionRef raise the memory of the application by a different
> amount?

In the case of pyramids at the end of Open the "last directory" which is
likely the top level of the pyramid will be the active directory.  Calling
GetProjectionRef() causes a switch of context back to the base pyramid level
to fetch the projection tags.   The base directory is typically larger
since it will have the projection, other metadata and bigger tile
offset/size arrays.

If these aren't leaks and the amounts of memory are modest why does it
matter what details are happening internally?  The behavior of the
GeoTIFF driver is fairly complex for some good, and some bad reasons.
Trying to understand the details of it's operation - especially by
observing memory use - is likely to be frustrating.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [email protected]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

**********************************************************************************************
This message (including any attachments) issued by RAFAEL- ADVANCED DEFENSE 
SYSTEMS LTD. 
(hereinafter "RAFAEL") contains confidential information intended for a 
specific individual and purpose, may 
constitute information that is privileged or confidential or otherwise 
protected from disclosure. If you are not 
the intended recipient, you should contact us immediately and thereafter delete 
this message from your 
system. You are hereby notified that any disclosure, copying, dissemination, 
distribution or forwarding of this 
message, or the taking of any action based on it, is strictly prohibited. If 
you have received this e-mail in error, 
please notify us immediately by e-mail mailto:[email protected] and 
completely delete or destroy any and all 
electronic or other copies of the original message and any attachments thereof.
**********************************************************************************************
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to