DocCache: Unbreak on !Linux platforms (#9566)

Regression since #9529
Fix #9565
reviewable/pr9576/r1
NiLuJe 2 years ago committed by GitHub
parent 4d48b6e2fe
commit 2420557085
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -15,7 +15,8 @@ local DHINTCOUNT = G_defaults:readSetting("DHINTCOUNT")
local function calcCacheMemSize()
local min = G_defaults:readSetting("DGLOBAL_CACHE_SIZE_MINIMUM")
local max = G_defaults:readSetting("DGLOBAL_CACHE_SIZE_MAXIMUM")
local calc = util.calcFreeMem() * (G_defaults:readSetting("DGLOBAL_CACHE_FREE_PROPORTION") or 0)
local memfree, _ = util.calcFreeMem() or 0, 0
local calc = memfree * G_defaults:readSetting("DGLOBAL_CACHE_FREE_PROPORTION")
return math.min(max, math.max(min, calc))
end
local doccache_size = calcCacheMemSize()

Loading…
Cancel
Save