[postgis-devel] [geos-devel] initGEOS semantic ?
pramsey at cleverelephant.ca
Sat Apr 17 10:46:51 PDT 2010
Yes, indeed. This could also be the source of a leak reported a couple
weeks ago in the otherwise boring centroid function...
On Sat, Apr 17, 2010 at 8:40 AM, strk <strk at keybit.net> wrote:
> As of GEOS r2974 initGEOS works back as it did in 3.0.0,
> that is it will not allocate new memory.
> To give you a figure, calling 'SELECT ST_IsValid(geom) from myTable;'
> where myTable contains 120044 geometries resulted in +4Mb of memory
> definitely lost: 4,801,698 bytes in 120,040 blocks.
> With the new commit that figure goes down to a constant 298 bytes.
> Might be worth a 3.2.2...
> On Sat, Apr 17, 2010 at 02:14:59PM +0200, strk wrote:
>> For the record, I verified that up to 3.0.0
>> the semantic was indeed NOT to allocate any new
>> structures, see:
>> Thus I think we should go back there.
>> On Sat, Apr 17, 2010 at 01:22:22PM +0200, strk wrote:
>> > I tought initGEOS() [ the non-rehentrant version ]
>> > was always returning the same handle, a singleton.
>> > Code reveals that's not the case, which means
>> > old clients (like postgis) end up allocating
>> > lots of contexts and leat them leak.
>> > So, is there any reason not to return a singleton ?
> geos-devel mailing list
> geos-devel at lists.osgeo.org
More information about the postgis-devel