Fix database maximum cache size cap

This commit is contained in:
Geoffrey Frogeye 2021-08-14 23:19:12 +02:00
parent edf444cc28
commit 389e83d492
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8

View file

@ -241,7 +241,7 @@ class Database(Profiler):
"the Ip4 cache is not necessary.")
max_cache_width = int(math.log2(max(1, max_size*8)))
allocated = False
cache_width = min(2**32, max_cache_width)
cache_width = min(32, max_cache_width)
while not allocated:
cache_size = 2**cache_width
try: