I was trying to make a copy of a very large NITF image (about 40Kx100K pixels) using GDALDriver::CreateCopy(). The new file was set to have different block-size (input was a scanline image, output is to have a 128x128 blocksize). The program keeps getting killed by the system (Linux). I monitor the memory use of the program as it was executing CreateCopy and the memory use was steadily increasing as the progress indicator from CreateCopy was moving forward. <br>
<br>Why does CreateCopy() use so much memory? I have not perused the source code of CreateCopy() yet, but I am guessing it employs RasterIO() to perform the read/write? <br><br>I was trying different sizes for GDAL  cache from 64MB, 256MB, 512MB, 1GB, and 2GB. The program got killed in all these cache sizes. In fact, my Linux box became unresponsive when I set GDALSetCacheMax() to 64MB.<br>
<br>Thank you.<br>Ozy<br><br> <br>