memleak in dijkstra sp? #46

Closed
mfortini opened this Issue Oct 5, 2011 · 5 comments

Comments

Projects
None yet
5 participants

mfortini commented Oct 5, 2011

I'm having issues with Dsp on a fairly large graph.
If I run several rounds of dsp with different sources and targets in the same session, the postgresql process memory keeps growing, until the OOM killer gets rid of it.
If I just close the session everytime, memory stays at a reasonable level.
I tried looking at the source code, but maybe I need some guidance in where to look at.
I can provide some sort of dataset, if it helps.

TIA

antonpa was assigned Oct 5, 2011

mfortini commented Oct 5, 2011

I should add: I'm currently using github master branch.

mfortini commented Oct 6, 2011

I tried to free the malloc()ed vector in the boost wrapper after copying it to a palloc()ed vector, but no improvement. Postgres is still blowing

Hello mfortini,

I was trying to fix this problem a long time ago, but I coudn´t.

I think the right way to fix this is calling palloc (c postgresql function) instead malloc from c++ code in the source code:

*path = (path_element_t *) malloc(sizeof(path_element_t) * (path_vect.size() + 1));

but I do not know exactly how to do this, if you can understand this:

http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html
http://dsc.sun.com/solaris/articles/mixing.html

surely you can fix it!

good luck!

Owner

woodbri commented Mar 20, 2013

I have merged pull request #67 into branch sew-devel-2_0.

@dkastl dkastl modified the milestone: Release 1.x Mar 23, 2015

dkastl removed the 1.x label Mar 23, 2015

Owner

woodbri commented Mar 23, 2015

Closing - Wont fix.

woodbri closed this Mar 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment