[geos-devel] Handle 1 000 000 geometry objects

Sandro Santilli strk at keybit.net
Fri Jun 5 08:17:33 PDT 2015

On Fri, Jun 05, 2015 at 05:39:50PM +0300, Gorbachev Ivan wrote:
> Hello!
> I need to handle 1 000 000 geometry objects. I process about  10 000
> objects at a time. I need to create the Geometry for each object, process
> Geometry and remove it after that. If I call "new" and "delete" too often,
> it leads to memory defragmentation and high memory consumption. Are there
> any methods to solve this problem in GEOS? Has the GEOS its own memory
> allocator?

There's no custom memory allocator. It would be a good idea to use one.
In Gnash we have a configure switch that enables use of jmalloc, could
be a place to look for inspiration: http://www.canonware.com/jemalloc/

Willing to give it a try and provide a patch ?


  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html

More information about the geos-devel mailing list