1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00
Michael Adam 55ff3a3b91 tdb: defragment the freelist in tdb_allocate_from_freelist()
While we are traversing the freelist anyways, merge a record
with the left if it is also a free list record.

That partially makes up for the fragmentation introduced by
the lack of merging with right records in tdb_free().

Note there is a potential slight downside:
If the left record we merge the current record into was earlier
in the chain and has hence already been met in traverse,
then we can not use the enlarged record even if it might be
a new best fit.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jun 26 12:16:03 CEST 2014 on sn-devel-104
2014-06-26 12:16:03 +02:00
..
2014-05-22 21:05:15 +02:00
2014-05-22 21:05:15 +02:00
2014-05-22 21:05:14 +02:00
2014-05-22 21:05:15 +02:00
2009-05-05 19:04:39 -04:00
2010-12-24 01:15:05 +01:00