[Tile-serving] [openstreetmap/osm2pgsql] Clean up pointers to middle_query_t in outputs to release memory (#1567)
Jochen Topf
notifications at github.com
Fri Sep 3 08:03:14 UTC 2021
The outputs have a shared pointer to the middle_query_t to access the data held by the middle. This in turn holds pointers to potentially large datastructures and the flat node file. We need to release those pointers after we don't need them any more so that if and when the middle doesn't need those data structures any more they get cleaned up.
In effect this releases the memory used for the cache and flat node store earlier.
Fixes #1563
The second commit cleans up the code a bit using a proper accessor in `output_t` to access the `mid` pointer.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/osm2pgsql/pull/1567
-- Commit Summary --
* Clean up pointers to middle_query_t in outputs to release memory
* Use proper accessor for m_mid member in output_t class
-- File Changes --
M src/osm2pgsql.cpp (24)
M src/osmdata.cpp (2)
M src/output-flex.cpp (18)
M src/output-gazetteer.cpp (8)
M src/output-pgsql.cpp (12)
M src/output.cpp (7)
M src/output.hpp (17)
-- Patch Links --
https://github.com/openstreetmap/osm2pgsql/pull/1567.patch
https://github.com/openstreetmap/osm2pgsql/pull/1567.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1567
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210903/6fb69097/attachment.htm>
More information about the Tile-serving
mailing list