From 53665d0e550330c331589df4d11de697e3a6ec91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 22 Dec 2016 09:26:18 +0100 Subject: text: make default block size overridable via C pre-processor This will be used for unit test purposes to force more allocations. --- text.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'text.c') 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. */ -- cgit v1.2.3