From d938c0b591d9c4aff9c92ae5eedd26ed97455f42 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 19 Jun 2012 12:42:08 +0930 Subject: ntdb: allocator attribute. This is designed to allow us to make ntdb_context (and NTDB_DATA returned from ntdb_fetch) a talloc pointer. But it can also be used for any other alternate allocator. Signed-off-by: Rusty Russell --- lib/ntdb/private.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/ntdb/private.h') diff --git a/lib/ntdb/private.h b/lib/ntdb/private.h index 01f2b45e9b..ee8eeb76af 100644 --- a/lib/ntdb/private.h +++ b/lib/ntdb/private.h @@ -596,6 +596,12 @@ struct ntdb_context { void *hash_data; uint64_t hash_seed; + /* Allocate and free functions. */ + void *(*alloc_fn)(const void *owner, size_t len, void *priv_data); + void *(*expand_fn)(void *old, size_t newlen, void *priv_data); + void (*free_fn)(void *old, void *priv_data); + void *alloc_data; + /* Our open hook, if any. */ enum NTDB_ERROR (*openhook)(int fd, void *data); void *openhook_data; -- cgit