Fix database maximum cache size cap
This commit is contained in:
parent
edf444cc28
commit
389e83d492
|
@ -241,7 +241,7 @@ class Database(Profiler):
|
||||||
"the Ip4 cache is not necessary.")
|
"the Ip4 cache is not necessary.")
|
||||||
max_cache_width = int(math.log2(max(1, max_size*8)))
|
max_cache_width = int(math.log2(max(1, max_size*8)))
|
||||||
allocated = False
|
allocated = False
|
||||||
cache_width = min(2**32, max_cache_width)
|
cache_width = min(32, max_cache_width)
|
||||||
while not allocated:
|
while not allocated:
|
||||||
cache_size = 2**cache_width
|
cache_size = 2**cache_width
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue