X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Flib%2Fhtable.h;h=054f9509deab89916760a724c5a5bdb710e8d84f;hb=355d4ebfbd57ec466089b4fdbd91c6edb99f5860;hp=45dd9be5a365e34642f14f67b56f2d4a6465d4e3;hpb=e89934e7365a7c5ea68b0a5c7c0286176178c754;p=bacula%2Fbacula diff --git a/bacula/src/lib/htable.h b/bacula/src/lib/htable.h index 45dd9be5a3..054f9509de 100644 --- a/bacula/src/lib/htable.h +++ b/bacula/src/lib/htable.h @@ -85,6 +85,7 @@ class htable : public SMARTALLOC { hlink *walkptr; /* table walk pointer */ uint64_t hash; /* temp storage */ uint64_t total_size; /* total bytes malloced */ + uint32_t extend_length; /* number of bytes to allocate when extending buffer */ uint32_t walk_index; /* table walk index */ uint32_t num_items; /* current number of items */ uint32_t max_items; /* maximum items before growing */ @@ -101,9 +102,9 @@ class htable : public SMARTALLOC { void grow_table(); /* grow the table */ public: - htable(void *item, void *link, int tsize = 31); + htable(void *item, void *link, int tsize = 31, int nr_pages = 0); ~htable() { destroy(); } - void init(void *item, void *link, int tsize = 31); + void init(void *item, void *link, int tsize = 31, int nr_pages = 0); bool insert(char *key, void *item); bool insert(uint32_t key, void *item); bool insert(uint64_t key, void *item);