ref: 0605c3789558e9e0494270c311bedb82f7319731
parent: 39febdb6031e556559a43494b396abb898228b2f
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Dec 18 13:09:45 EST 2023
load: clamp reserve size to reasonable ranges
--- a/load.c
+++ b/load.c
@@ -111,8 +111,10 @@
a = &fs->arenas[i];
loadarena(a, fs->arenabp[i]);
a->reserve = a->size / 1024;
- if(a->reserve < 32*MiB)
- a->reserve = 32*MiB;
+ if(a->reserve < 512*KiB)
+ a->reserve = 512*KiB;
+ if(a->reserve > 8*MiB)
+ a->reserve = 8*MiB;
}
for(i = 0; i < fs->narena; i++){
a = &fs->arenas[i];