[postgis-devel] [PostGIS] #851: [raster] Numerous ST_Value query cause the memory to grow indefinitely

PostGIS trac at osgeo.org
Wed Apr 6 23:47:46 PDT 2011


#851: [raster] Numerous ST_Value query cause the memory to grow indefinitely
----------------------------+-----------------------------------------------
 Reporter:  pracine         |       Owner:  jorgearevalo 
     Type:  defect          |      Status:  assigned     
 Priority:  blocker         |   Milestone:  PostGIS 2.0.0
Component:  postgis raster  |     Version:  trunk        
 Keywords:                  |  
----------------------------+-----------------------------------------------
Changes (by jorgearevalo):

  * status:  new => assigned


Comment:

 For the record: After 8h executing the query in a 64bits machine, with a
 10x10px tiled raster, it took 240MB. 180MB from heap. And growing. As
 Pierre said, typical memory leak.

 Same symptom in MapAlgebra, like Pierre said too. And there're 2 common
 potential memory-leak points:[[BR]]
 - rt_context_new: context allocated is not freed. It should be always
 freed.[[BR]]
 - rt_raster_deserialize: allocated memory for raster object. It should be
 always freed. Even when the function returns that raster, because the
 raster is serialized again before returning it.[[BR]]

 Freeing that memory should solve the memory leak. Testing it.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/851#comment:16>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list