GDALSetCacheMax(1024 * 1024 * 1024 * 2); // 2048 MB 转换为字节
获取当前缓存大小(字节)
int cacheUsed = GDALGetCacheUsed64();
int cacheMax = GDALGetCacheMax64();
std::cout << "GDAL 缓存使用: " << cacheUsed / (1024 * 1024) << " MB" << std::endl;
std::cout << "GDAL 缓存最大值: " << cacheMax / (1024 * 1024) << " MB" << std::endl;
gdal 查看设置缓存
最新推荐文章于 2024-11-20 09:29:33 发布