aboutsummaryrefslogtreecommitdiff
path: root/text.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-12-22 09:26:18 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-12-22 09:26:18 +0100
commit53665d0e550330c331589df4d11de697e3a6ec91 (patch)
treed07624ae1f69a37400a0cb24f29a037dad08c822 /text.c
parenta1bb9deaee96433ad57c7eb7df1ea2d8f41a1b09 (diff)
downloadvis-53665d0e550330c331589df4d11de697e3a6ec91.tar.gz
vis-53665d0e550330c331589df4d11de697e3a6ec91.tar.xz
text: make default block size overridable via C pre-processor
This will be used for unit test purposes to force more allocations.
Diffstat (limited to 'text.c')
-rw-r--r--text.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/text.c b/text.c
index 55edf0e..1e97a14 100644
--- a/text.c
+++ b/text.c
@@ -24,7 +24,9 @@
#include "util.h"
/* Allocate blocks holding the actual file content in junks of size: */
+#ifndef BLOCK_SIZE
#define BLOCK_SIZE (1 << 20)
+#endif
/* Files smaller than this value are copied on load, larger ones are mmap(2)-ed
* directely. Hence the former can be truncated, while doing so on the latter
* results in havoc. */