summaryrefslogtreecommitdiffstats
path: root/zix/btree.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-07-11 18:12:43 +0000
committerDavid Robillard <d@drobilla.net>2016-07-11 18:12:43 +0000
commitf2f69d6d18e240931ba825633108107e948c1984 (patch)
treef0b7fe820f84532437977667380fbfd3c68a82b1 /zix/btree.c
parentcc4c8641bdd2d60864e6a4236539a7013eb00ad7 (diff)
downloadzix-f2f69d6d18e240931ba825633108107e948c1984.tar.gz
zix-f2f69d6d18e240931ba825633108107e948c1984.tar.bz2
zix-f2f69d6d18e240931ba825633108107e948c1984.zip
Add page size configuration option
git-svn-id: http://svn.drobilla.net/zix/trunk@107 df6676b4-ccc9-40e5-b5d6-7c4628a128e3
Diffstat (limited to 'zix/btree.c')
-rw-r--r--zix/btree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/zix/btree.c b/zix/btree.c
index 4557ad4..d28f6c2 100644
--- a/zix/btree.c
+++ b/zix/btree.c
@@ -24,7 +24,10 @@
// #define ZIX_BTREE_DEBUG 1
-#define ZIX_BTREE_PAGE_SIZE 4096
+#ifndef ZIX_BTREE_PAGE_SIZE
+# define ZIX_BTREE_PAGE_SIZE 4096
+#endif
+
#define ZIX_BTREE_NODE_SPACE (ZIX_BTREE_PAGE_SIZE - 2 * sizeof(uint16_t))
#define ZIX_BTREE_LEAF_VALS ((ZIX_BTREE_NODE_SPACE / sizeof(void*)) - 1)
#define ZIX_BTREE_INODE_VALS (ZIX_BTREE_LEAF_VALS / 2)