The C# bindings in GDAL expose the method called
Gdal.SetCacheMax(int nBytes)
for setting the GDAL Raster block cache size. However, it takes in an int and that int represents the number of bytes. So, to set the memory to, let's say, 8GB I will have to provide 8 * 1024 * 1024 as the input value, which exceeds the maximum allowable int size and wraps around as a negative number.
How do I set like 75% of my RAM OR like 12 GB of RAM for CACHE_MAX value using C# bindings of GDAL?