diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-06 21:58:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-06 21:58:15 +0000 |
commit | 974640d66e61e81cb197ad96fdff7b08343e4c5a (patch) | |
tree | 2e1f75f32f312b7f24ba82b4590ae230bcd6f399 /Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua | |
parent | b4fa72e61230aca75f7f6fbf988821f71edfb6b2 (diff) |
context
git-svn-id: svn://tug.org/texlive/trunk@58167 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua index 620de9a15b4..feb5464009b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/luat-sto.lua @@ -94,27 +94,12 @@ if environment.initex then end --- to be tested with otf caching: - -function lua.collectgarbage(threshold) - local current = collectgarbage("count") - local threshold = threshold or 256 * 1024 - while true do - collectgarbage("collect") - local previous = collectgarbage("count") - if current - previous < threshold then - break - else - current = previous - end - end -end - statistics.register("stored bytecode data", function() - local nofmodules = (storage.nofmodules > 0 and storage.nofmodules) or (status.luabytecodes - lua.firstbytecode - 1) - local nofdumps = (storage.noftables > 0 and storage.noftables ) or storage.max-storage.min + 1 - local tofmodules = storage.tofmodules or 0 - local tofdumps = storage.toftables or 0 + local nofbytecodes = CONTEXTLMTXMODE > 0 and status.luastate.bytecodes or status.luabytecodes + local nofmodules = (storage.nofmodules > 0 and storage.nofmodules) or (nofbytecodes - lua.firstbytecode - 1) + local nofdumps = (storage.noftables > 0 and storage.noftables ) or storage.max-storage.min + 1 + local tofmodules = storage.tofmodules or 0 + local tofdumps = storage.toftables or 0 if environment.initex then local luautilities = utilities.lua return format("%s modules, %s tables, %s chunks, %s chunks stripped (%s bytes)", |