diff --git a/xapian-core/backends/brass/brass_table.cc b/xapian-core/backends/brass/brass_table.cc
index 235bd31..5c4c1f6 100644
|
a
|
b
|
static inline byte *zeroed_new(size_t size)
|
| 186 | 186 | * sequential additions (in negated form). */ |
| 187 | 187 | #define SEQ_START_POINT (-10) |
| 188 | 188 | |
| 189 | | /** Even for items of at maximum size, it must be possible to get this number of |
| 190 | | * items in a block */ |
| 191 | | #define BLOCK_CAPACITY 4 |
| 192 | | |
| 193 | | |
| 194 | 189 | /* There are two bit maps in bit_map0 and bit_map. The nth bit of bitmap is 0 |
| 195 | 190 | if the nth block is free, otherwise 1. bit_map0 is the initial state of |
| 196 | 191 | bitmap at the start of the current transaction. |
diff --git a/xapian-core/backends/brass/brass_table.h b/xapian-core/backends/brass/brass_table.h
index 6f09381..58cae52 100644
|
a
|
b
|
|
| 43 | 43 | |
| 44 | 44 | #define DONT_COMPRESS -1 |
| 45 | 45 | |
| | 46 | /** Even for items of at maximum size, it must be possible to get this number of |
| | 47 | * items in a block */ |
| | 48 | #define BLOCK_CAPACITY 4 |
| | 49 | |
| 46 | 50 | /** The largest possible value of a key_len. |
| 47 | 51 | * |
| 48 | 52 | * This gives the upper limit of the size of a key that may be stored in the |
| … |
… |
class XAPIAN_VISIBILITY_DEFAULT BrassTable {
|
| 598 | 602 | * The default is BLOCK_CAPACITY (which is currently 4). |
| 599 | 603 | */ |
| 600 | 604 | void set_max_item_size(size_t block_capacity) { |
| 601 | | if (block_capacity > 4) block_capacity = 4; |
| | 605 | if (block_capacity > BLOCK_CAPACITY) block_capacity = BLOCK_CAPACITY; |
| 602 | 606 | max_item_size = (block_size - DIR_START - block_capacity * D2) |
| 603 | 607 | / block_capacity; |
| 604 | 608 | } |
diff --git a/xapian-core/backends/chert/chert_table.cc b/xapian-core/backends/chert/chert_table.cc
index 32406d3..fb7e728 100644
|
a
|
b
|
static inline byte *zeroed_new(size_t size)
|
| 186 | 186 | * sequential additions (in negated form). */ |
| 187 | 187 | #define SEQ_START_POINT (-10) |
| 188 | 188 | |
| 189 | | /** Even for items of at maximum size, it must be possible to get this number of |
| 190 | | * items in a block */ |
| 191 | | #define BLOCK_CAPACITY 4 |
| 192 | | |
| 193 | 189 | |
| 194 | 190 | /* There are two bit maps in bit_map0 and bit_map. The nth bit of bitmap is 0 |
| 195 | 191 | if the nth block is free, otherwise 1. bit_map0 is the initial state of |
diff --git a/xapian-core/backends/chert/chert_table.h b/xapian-core/backends/chert/chert_table.h
index 2f7caf0..cfead79 100644
|
a
|
b
|
|
| 50 | 50 | */ |
| 51 | 51 | #define CHERT_BTREE_MAX_KEY_LEN 252 |
| 52 | 52 | |
| | 53 | /** Even for items of at maximum size, it must be possible to get this number of |
| | 54 | * items in a block */ |
| | 55 | #define BLOCK_CAPACITY 4 |
| | 56 | |
| 53 | 57 | // FIXME: This named constant probably isn't used everywhere it should be... |
| 54 | 58 | #define BYTES_PER_BLOCK_NUMBER 4 |
| 55 | 59 | |
| … |
… |
class XAPIAN_VISIBILITY_DEFAULT ChertTable {
|
| 594 | 598 | * The default is BLOCK_CAPACITY (which is currently 4). |
| 595 | 599 | */ |
| 596 | 600 | void set_max_item_size(size_t block_capacity) { |
| 597 | | if (block_capacity > 4) block_capacity = 4; |
| | 601 | if (block_capacity > BLOCK_CAPACITY) block_capacity = BLOCK_CAPACITY; |
| 598 | 602 | max_item_size = (block_size - DIR_START - block_capacity * D2) |
| 599 | 603 | / block_capacity; |
| 600 | 604 | } |
diff --git a/xapian-core/backends/flint/flint_table.cc b/xapian-core/backends/flint/flint_table.cc
index 1628d03..715c3fd 100644
|
a
|
b
|
static inline byte *zeroed_new(size_t size)
|
| 199 | 199 | * sequential additions (in negated form). */ |
| 200 | 200 | #define SEQ_START_POINT (-10) |
| 201 | 201 | |
| 202 | | /** Even for items of at maximum size, it must be possible to get this number of |
| 203 | | * items in a block */ |
| 204 | | #define BLOCK_CAPACITY 4 |
| 205 | | |
| 206 | 202 | |
| 207 | 203 | |
| 208 | 204 | /* There are two bit maps in bit_map0 and bit_map. The nth bit of bitmap is 0 |
diff --git a/xapian-core/backends/flint/flint_table.h b/xapian-core/backends/flint/flint_table.h
index d37b046..3050107 100644
|
a
|
b
|
|
| 49 | 49 | */ |
| 50 | 50 | #define FLINT_BTREE_MAX_KEY_LEN 252 |
| 51 | 51 | |
| | 52 | /** Even for items of at maximum size, it must be possible to get this number of |
| | 53 | * items in a block */ |
| | 54 | #define BLOCK_CAPACITY 4 |
| | 55 | |
| 52 | 56 | // FIXME: This named constant probably isn't used everywhere it should be... |
| 53 | 57 | #define BYTES_PER_BLOCK_NUMBER 4 |
| 54 | 58 | |
| … |
… |
class XAPIAN_VISIBILITY_DEFAULT FlintTable {
|
| 562 | 566 | * The default is BLOCK_CAPACITY (which is currently 4). |
| 563 | 567 | */ |
| 564 | 568 | void set_max_item_size(size_t block_capacity) { |
| 565 | | if (block_capacity > 4) block_capacity = 4; |
| | 569 | if (block_capacity > BLOCK_CAPACITY) block_capacity = BLOCK_CAPACITY; |
| 566 | 570 | max_item_size = (block_size - 11 /*DIR_START*/ - block_capacity * D2) |
| 567 | 571 | / block_capacity; |
| 568 | 572 | } |