Tim,
> It seems like the input "int nBytes" is the problem, as it is passed to
> VSIMalloc whicih takes a size_t type. The int type is signed and 32-bit so
> it can't handle over 2 * 2^30 (2 GB). It's probably rolling over, then when
> cast to size_t it is interpreted as that huge size in the OSX
I'm trying to use gdal.FileFromMemBuffer to do some in-memory processing, but I
ran into what seems to be a 2 GB limit.
If I create a TIF on disk that is just below 2 GB, things work fine:
import gdal
drv = gdal.GetDriverByName("GTiff")
ds = drv.Create("45000.tif", 45000, 45000, 1, gdal.GDT_Byte)