mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
mcode force allocation on Android is now optional
Anyone who encounters random freeze of koreader for Android
is encouraged to enable this by adding a file at
"/sdcard/koreader/patch.lua" with the content of:
```
require("jit.opt").start("sizemcode=256","maxmcode=256")
for i=1,100 do end -- Force allocation of one large segment
```
The sizemcode and maxmcode could be adjusted from 196 to 512 to
make koreader best fit on your Android device.
This commit is contained in:
@@ -23,6 +23,9 @@ local file = A.jni:context(A.app.activity.vm, function(JNI)
|
||||
end)
|
||||
A.LOGI("intent file path " .. (file or ""))
|
||||
|
||||
-- run koreader patch before koreader startup
|
||||
pcall(function() dofile("/sdcard/koreader/patch.lua") end)
|
||||
|
||||
-- create fake command-line arguments
|
||||
arg = {"-d", file or "/sdcard"}
|
||||
dofile(A.dir.."/reader.lua")
|
||||
|
||||
Submodule platform/android/luajit-launcher updated: 64caed0025...4c5c9f9674
Reference in New Issue
Block a user