Hi,
whether the reason is the same I can't say but parseversion is still leaking
memory somehow:
#define LIBDPKG_VOLATILE_API 1
#include <dpkg/dpkg.h>
#include <dpkg/version.h>
int main()
{
struct dpkg_version ver;
int i;
for (i = 0; i < 100000000; ++i) {
parseversion(&ver, "1.0.0", NULL);
}
return 0;
}
$ gcc leak.c -ldpkg && /usr/bin/time -v ./a.out 2>&1 | grep Maximum
Maximum resident set size (kbytes): 1569096
Just as the original submitter I wanted to use parseversion to parse *LOTS* of
versions. My plans where thwarted when I discovered the memory leak.
cheers, josch
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]