[Gdal-dev] GTiff driver memory map

Julien Demaria dem at acri-st.fr
Thu Oct 28 11:43:20 EDT 2004


Hi,

Memory map in GDAL's GeoTIFF driver seems to be disabled :

in gdal/frmts/gtiff/libtiff/tif_vsi.c :

static int
_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
{
	(void) fd; (void) pbase; (void) psize;
	return (0);
}

and in libtiff/libtiff/tif_unix.c :

static int
_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
{
	toff_t size = _tiffSizeProc(fd);
	if (size != (toff_t) -1) {
		*pbase = (tdata_t)
		    mmap(0, size, PROT_READ, MAP_SHARED, (int) fd, 0);
		if (*pbase != (tdata_t) -1) {
			*psize = size;
			return (1);
		}
	}
	return (0);
}

are there reasons to this ?

Thanks,

Julien




More information about the Gdal-dev mailing list