Improve the documentation of the RAM parameter
A "ram" parameter is available in many OTB applications, it is documented as
ram: Available memory for processing (in MB).
An environment variable
OTB_MAX_RAM_HINT is also available :
OTB_MAX_RAM_HINT: Default maximum memory that OTB should use for processing, in MB. If not set, default value is 128 MB.
The role of these parameters is to control the ram value used to determine the number of streaming block created by a writer (ImageFileWriter or virtual writer). It is compared by the memory print computed by the writer: the sum of the size of each intermediate filter output multiplied by the pixel size (in byte), for a requested region of a given size.
If we consider that the size of all non image C++ objects created by the application is negligible compared to the ram parameter, the ram parameter effectively controls the RAM used by the OTB application. In the common case of an application instantiating only a few filters and producing an output image, this assumption is probably reasonable). But in some applications, there are other voluminous objects that are not taken into account in the total RAM footprint. In this case the documentation of the ram parameter is misguiding because the total RAM used will be higher than the set RAM.
I think we should update the documentation to clarify what the effect of this parameter really is.
This also applies to the log:
(INFO): Estimated memory for full processing: 41.1034MB