[GENERAL] [postgis-users] Union as an aggregate

strk strk at keybit.net
Wed Oct 1 06:43:01 PDT 2003


dblasby wrote:
> I'm looking at the GEOS->POSTGIS converter and I think I might have 
> found a problem.

postgis_geos_wrapper.cpp: GEOSGeometryType(Geometry *g1)
	returns malloced memory.

postgis_geos.c: GEOS2POSTGIS()
	calls GEOSGeometryType and never frees returned value.

I've seen many malloc calls in postgis_geos_wrapper,
would palloc be more appropriate there ?

Anyway - I'm not sure but I think that pfree'ing palloc'ed memory
in general might help in keeping memory usage under an acceptable
size. Don't know how postgres handles that exactly though ...




More information about the postgis-users mailing list