Merge pull request #491 from nvt/fix-default-file-size

Improved default file size in Antelope
This commit is contained in:
Joakim Eriksson 2018-05-04 19:45:37 +02:00 committed by GitHub
commit 7381c44299
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -38,6 +38,7 @@
#define DB_OPTIONS_H
#include "contiki.h"
#include "cfs-coffee-arch.h"
/*----------------------------------------------------------------------------*/
@ -143,9 +144,17 @@
/* The default relation file size to reserve when using Coffee. */
#ifndef DB_COFFEE_RESERVE_SIZE
#define DB_COFFEE_RESERVE_SIZE (128 * 1024UL)
#define DB_COFFEE_RESERVE_SIZE (COFFEE_SIZE / 8)
#endif /* DB_COFFEE_RESERVE_SIZE */
/*
* Ensure that the default size of Coffee file reservations is suitable
* for the file system size.
*/
#if DB_COFFEE_RESERVE_SIZE > (COFFEE_SIZE / 2)
#error DB_COFFEE_RESERVE_SIZE is too large for the file system.
#endif
/* The maximum size of the physical storage of a tuple (labelled a "row"
in Antelope's terminology. */
#ifndef DB_MAX_CHAR_SIZE_PER_ROW