mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Optimization: Use constant folding for divisions not a power of two (#9609)
This commit is contained in:
@@ -64,7 +64,7 @@ function ReaderDeviceStatus:init()
|
||||
if statm then
|
||||
local dummy, rss = statm:read("*number", "*number")
|
||||
statm:close()
|
||||
rss = math.floor(rss * 4096 / 1024 / 1024)
|
||||
rss = math.floor(rss * (4096 / 1024 / 1024))
|
||||
if rss >= self.memory_threshold then
|
||||
if self.memory_confirm_box then
|
||||
UIManager:close(self.memory_confirm_box)
|
||||
|
||||
Reference in New Issue
Block a user