Ticket #1436 (closed defect: fixed)

Opened 5 months ago

Last modified 5 months ago

shp2pgsql memory leakage

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS 2.0.0
Component: loader/dumper Version: trunk
Keywords: Cc:

Description

3 megabytes lost during loading of GSHHS data:

==20958==    definitely lost: 3,468,357 bytes in 200,647 blocks

Data is here:

http://www.ngdc.noaa.gov/mgg/shorelines/data/gshhs/version2.2.0/GSHHS_shp_2.2.0.zip

The call:

./shp2pgsql -s 4326 -g geom -G -I ~/Desktop/GSHHS_shp/i/GSHHS_i_L1.shp coast1

Change History

Changed 5 months ago by strk

It is the UTF8 conversion leaking:

==21046== HEAP SUMMARY:
==21046==     in use at exit: 3,468,357 bytes in 200,647 blocks
==21046==   total heap usage: 1,840,844 allocs, 1,640,197 frees, 6,746,422,052 bytes allocated
==21046== 
==21046== 6 bytes in 1 blocks are definitely lost in loss record 1 of 2
==21046==    at 0x4C274A8: malloc (vg_replace_malloc.c:236)
==21046==    by 0x4097A1: set_loader_config_defaults (shp2pgsql-core.c:763)
==21046==    by 0x40BAA5: main (shp2pgsql-cli.c:86)
==21046== 
==21046== 3,468,351 bytes in 200,646 blocks are definitely lost in loss record 2 of 2
==21046==    at 0x4C274A8: malloc (vg_replace_malloc.c:236)
==21046==    by 0x409FCD: utf8 (shp2pgsql-core.c:93)
==21046==    by 0x40A45D: ShpLoaderGenerateSQLRowStatement (shp2pgsql-core.c:1558)
==21046==    by 0x40BF63: main (shp2pgsql-cli.c:346)
==21046== 
==21046== LEAK SUMMARY:
==21046==    definitely lost: 3,468,357 bytes in 200,647 blocks
==21046==    indirectly lost: 0 bytes in 0 blocks
==21046==      possibly lost: 0 bytes in 0 blocks
==21046==    still reachable: 0 bytes in 0 blocks
==21046==         suppressed: 0 bytes in 0 blocks

Changed 5 months ago by strk

  • owner changed from mcayland to strk
  • status changed from new to assigned

Changed 5 months ago by strk

  • status changed from assigned to closed
  • resolution set to fixed

Fixed with r8709

Note: See TracTickets for help on using tickets.