Get the maximum memory size available for the GDAL block cache
Source:R/RcppExports.R
get_cache_max.Rd
get_cache_max()
returns the maximum amount of memory available to the
GDALRasterBlock caching system for caching raster read/write data. Wrapper
of GDALGetCacheMax64()
with return value in MB by default.
Value
A numeric value carrying the integer64
class attribute. Maximum
cache memory available in the requested units.
Details
The first time this function is called, it will read the GDAL_CACHEMAX
configuration option to initialize the maximum cache memory. The value of
the configuration option can be expressed as x% of the usable physical RAM
(which may potentially be used by other processes). Otherwise it is
expected to be a value in MB.
As of GDAL 3.10, the default value, if GDAL_CACHEMAX
has not been set
explicitly, is 5% of usable physical RAM.
Note
The value of the GDAL_CACHEMAX
configuration option is only consulted the
first time the cache size is requested (i.e., it must be set as a
configuration option prior to any raster I/O during the current session).
To change this value programmatically during operation of the program it is
better to use set_cache_max()
(in which case, always given in bytes).