[Gdal-dev] memory leak in MapInfo layer
Mateusz Loskot
mateusz at loskot.net
Tue Jun 13 16:20:49 EDT 2006
Richard Matsunaga wrote:
> Could there be something I am doing wrong that is leading to this
> problem with MapInfo files?
Richard,
I tested ogr2ogr tool (current CVS) to dump Shapefiles to MapInfo (both
formats) with valgrind (Unix memory debugger) and no memory leaks have
been detected. Here you have what commands I did run and results I got:
mloskot:~/dev/gdal/_cvs/gdal$ valgrind --tool=memcheck --leak-check=yes
ogr/ogr2ogr -f "MapInfo File" ~/tmp/xxx.mif ~/data/test/polys.shp
==2096== Memcheck, a memory error detector.
==2096== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==2096== Using LibVEX rev 1471, a library for dynamic binary translation.
==2096== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==2096== Using valgrind-3.1.0-Debian, a dynamic binary instrumentation
framework.
==2096== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==2096== For more details, rerun with: -v
==2096==
==2096==
==2096== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 73 from 1)
==2096== malloc/free: in use at exit: 0 bytes in 0 blocks.
==2096== malloc/free: 169,163 allocs, 169,163 frees, 9,335,586 bytes
allocated.
==2096== For counts of detected errors, rerun with: -v
==2096== No malloc'd blocks -- no leaks are possible.
mloskot:~/dev/gdal/_cvs/gdal$ valgrind --tool=memcheck --leak-check=yes
ogr/ogr2ogr -f "MapInfo File" ~/tmp/zzz.tab ~/data/test/polys.shp
==2100== Memcheck, a memory error detector.
==2100== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==2100== Using LibVEX rev 1471, a library for dynamic binary translation.
==2100== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==2100== Using valgrind-3.1.0-Debian, a dynamic binary instrumentation
framework.
==2100== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==2100== For more details, rerun with: -v
==2100==
==2100==
==2100== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 73 from 1)
==2100== malloc/free: in use at exit: 0 bytes in 0 blocks.
==2100== malloc/free: 187,098 allocs, 187,098 frees, 11,675,855 bytes
allocated.
==2100== For counts of detected errors, rerun with: -v
==2100== No malloc'd blocks -- no leaks are possible.
So, I'd suppose there is something wrong with:
- C# bindings you're using
- or you're using OGR incorrectly
Cheers
--
Mateusz Loskot
http://mateusz.loskot.net
More information about the Gdal-dev
mailing list