On Sun, 2011-10-09 at 20:06 +0100, Andrew Beverley wrote:
> On Sat, 2011-10-08 at 21:18 +0200, Henrik Nordström wrote:
> > fre 2011-10-07 klockan 19:18 +0100 skrev Andrew Beverley:
> >
> > > I admit that I am rushing to submit this as I go away for the weekend,
> > > so please let me know if it's not up to scratch! Works For Me (TM)
> > > though.
> >
> > Why are you allocating the DBT structures?
>
> With the newer version of Berkeley DB, the structures need to be
> initialised to null before use. I thought that in order to do so, I had
> to allocate the memory. This was wrong, so I have now just made sure
> that they are properly initiated before use in the new patch attached.
>
> > Also you are not freeing them, causing a memory leak on each lookup.
> >
>
> Good point, although I've remove the malloc now as above.
>
> I've made a couple of other minor changes - please find updated patch
> attached for merge assuming you are happy with it. When using the DB
> environment, I have hard-coded the name of the database file within the
> directory. I can't see any problems with this, but please let me know if
> you disagree (I did originally used program_name, but this doesn't work
> when it contains the full path).
>
> I have also removed the ->sync calls, as these are not required with the
> improved synchronisation of the DB environment.
Any chance of getting this accepted please? Or is there still some work
that I need to do on it? I've been using it for a while now and it seems
to work well.
Thanks,
Andy
Received on Mon Oct 17 2011 - 18:23:08 MDT
This archive was generated by hypermail 2.2.0 : Tue Oct 18 2011 - 12:00:08 MDT