Re: [geos-devel] GEOS cross-heap problems
On Wed, May 13, 2009 at 12:19:23AM -0400, Frank Warmerdam wrote: Paul Ramsey wrote: I'd like to hear from others on this. OK - though I don't see the downside. Downstream packages only need to check for, and use GEOSFree() if they want. We are just adding a new option, not altering an existing one or removing anything. Agreed, no compatibility problem adding a GEOSFree. Only, it'll have to stay (I've read Mateusz suggesting using type-specific destroyers). Worth going throught the CAPI header files and properly document when to use GEOSFree on the return right above the function. PS: I've noticed Frank added a ChangeLog entry manually. Was that the way ? As I haven't touched it :( --strk; Free GIS Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] GEOS cross-heap problems
strk wrote: On Wed, May 13, 2009 at 12:19:23AM -0400, Frank Warmerdam wrote: Paul Ramsey wrote: I'd like to hear from others on this. OK - though I don't see the downside. Downstream packages only need to check for, and use GEOSFree() if they want. We are just adding a new option, not altering an existing one or removing anything. Agreed, no compatibility problem adding a GEOSFree. Folks, OK, I've back ported the GEOSFree() function into the 3.1 branch. Note, it will be very important to ensure that the C API version is upgraded for the 3.1.1 release. I'm not sure how we remember to do stuff like this. I see there have been a few fixes in the 3.1 branch: http://trac.osgeo.org/geos/log/branches/3.1 Perhaps it would be appropriate for us to roll out a 3.1.1? Only, it'll have to stay (I've read Mateusz suggesting using type-specific destroyers). I cannot imagine why a type specific destroyer would be needed for simple malloc()/free() buffer allocations. Worth going throught the CAPI header files and properly document when to use GEOSFree on the return right above the function. I have slightly modified the geos_c.h.in to reflect use of GEOSFree() but I wonder if there is other documentation of the C API. PS: I've noticed Frank added a ChangeLog entry manually. Was that the way ? As I haven't touched it :( I assumed this was expected practice since the ChangeLog exists and is updated by at least some developers. Best regards, -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Programmer for Rent ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] GEOS cross-heap problems
Frank Warmerdam wrote: strk wrote: On Wed, May 13, 2009 at 12:19:23AM -0400, Frank Warmerdam wrote: Only, it'll have to stay (I've read Mateusz suggesting using type-specific destroyers). I cannot imagine why a type specific destroyer would be needed for simple malloc()/free() buffer allocations. Frank, But GEOS user does not know what allocator is hidden behind GEOSGeomToWKT function and he does *not* need or want to know. GEOSFree exposes all the meat that is supposed be encapsulated and it makes GEOS C API not symmetric so confusing. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] GEOS cross-heap problems
On May 13, 2009, at 7:42 AM, Mateusz Loskot wrote: Frank Warmerdam wrote: strk wrote: On Wed, May 13, 2009 at 12:19:23AM -0400, Frank Warmerdam wrote: Only, it'll have to stay (I've read Mateusz suggesting using type-specific destroyers). I cannot imagine why a type specific destroyer would be needed for simple malloc()/free() buffer allocations. Frank, But GEOS user does not know what allocator is hidden behind GEOSGeomToWKT function and he does *not* need or want to know. GEOSFree exposes all the meat that is supposed be encapsulated and it makes GEOS C API not symmetric so confusing. Aren't we supposed to be using the reader/writer API now? Add GEOSWK*Writer_Free functions (if we must) to those interfaces and GEOSFree to address the problem with deprecated GeomToWKT? Cheers, Sean ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] GEOS cross-heap problems
Sean Gillies wrote: On May 13, 2009, at 7:42 AM, Mateusz Loskot wrote: Frank Warmerdam wrote: strk wrote: On Wed, May 13, 2009 at 12:19:23AM -0400, Frank Warmerdam wrote: Only, it'll have to stay (I've read Mateusz suggesting using type-specific destroyers). I cannot imagine why a type specific destroyer would be needed for simple malloc()/free() buffer allocations. Frank, But GEOS user does not know what allocator is hidden behind GEOSGeomToWKT function and he does *not* need or want to know. GEOSFree exposes all the meat that is supposed be encapsulated and it makes GEOS C API not symmetric so confusing. Aren't we supposed to be using the reader/writer API now? Add GEOSWK*Writer_Free functions (if we must) to those interfaces and GEOSFree to address the problem with deprecated GeomToWKT? Sean / Mateusz, It is my personal opinion that since these buffers are just allocated from the heap with malloc(), exposing a GEOS specific free - and making it clear when it is suitable to use is a more than adequate solution. If you guys feel strongly enough about type specific, or reader/writer interface specific deallocators for these buffers then I'd suggest you bring it to a motion to replace/override my implementation and I'll then adapt GDAL appropriately. I'm in a bad mood, and less receptive than normal to esoteric conceptual correctness wanking. Regards, -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Programmer for Rent ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel