1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/lib/tdb/common
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
..
check.c tdb: introduce TDB_SUPPORTED_FEATURE_FLAGS 2014-05-22 21:05:15 +02:00
dump.c tdb: tdbtool: dump record magic with fixed number of 8 hex digits 2014-02-14 15:53:25 -08:00
error.c tdb: Fix blank line endings 2012-12-21 11:54:53 +01:00
freelist.c tdb: defragment the freelist in tdb_allocate_from_freelist() 2014-06-26 12:16:03 +02:00
freelistcheck.c tdb: Use tdb_null in freelistcheck 2013-02-19 15:46:45 +01:00
hash.c tdb: enable VALGRIND to remove valgrind noise. 2011-06-08 11:05:47 +02:00
io.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
lock.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
mutex.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
open.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
rescue.c tdb: Remove "header" from tdb_context 2013-02-05 13:18:28 +01:00
summary.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
tdb_private.h tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
tdb.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
transaction.c tdb: add TDB_MUTEX_LOCKING support 2014-05-22 21:05:15 +02:00
traverse.c tdb: Remove "header" from tdb_context 2013-02-05 13:18:28 +01:00