#3689 closed enhancement (fixed)
[PATH] Allow using more than 2GB for GDAL cache
Reported by: | Even Rouault | Owned by: | Even Rouault |
---|---|---|---|
Priority: | normal | Milestone: | 1.8.0 |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | gdal cache |
Cc: | warmerdam |
Description (last modified by )
The attached patch changes the internal type of the max cache size to GIntBig to allow more than 2GB for GDAL cache. It introduces the GDALSetCacheMax64(), GDALGetCacheMax64() and GDALGetCacheUsed64() API. Old 32 bit API are preserved for backward compatibility. Old 32 bit API warn the user if they must be truncated the returned value (GetCacheMax() and GetCacheUsed()).
On 32bit builds of GDAL, GDALSetCacheMax64() will *NOT* warn if the user tries to pass a value greater than the maximum amount of memory that can be addressed. (This is a change w.r.t. the initial implementation since 32bit OS depending on their configuration can allow a process to allocate between 2 and 4 GB)
Attachments (1)
Change History (5)
by , 13 years ago
Attachment: | cache64.patch added |
---|
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
no serious reason in fact, apart the fact I disliked to have to pass the length of the string... Anyway, I dropped the CPLAtoi64() in favour of CPLScanUIntBig()
Commited in trunk in r20091
comment:3 by , 13 years ago
r20093 /trunk/gdal/swig/ (4 files in 4 dirs): Python bindings : map gdal.GetCacheMax(), gdal.SetCacheMax() and gdal.GetCacheUsed() to the corresponding 64bit new API
comment:4 by , 13 years ago
Description: | modified (diff) |
---|
I'm ok with this. Any reason for introducing a new string to bigint function when we already have CPLScanUIntBig?