Go to file
Brad Jorsch 84d96e843c LuaStandalone: Release functions when no longer referenced
The LuaStandalone interpreter needs to keep a mapping from integers
returned to PHP to the corresponding function. But if it never releases
these functions when PHP no longer has any reference to them, it can
result in Lua running out of memory if a module with a large number of
functions is invoked many times in one page.

The fix here is to track which function ids are referenced from PHP, and
periodically send the list to Lua so it can remove any that are no
longer used from its cache.

This also takes care of another issue where having multiple interpreter
instances and passing function objects from one into another could call
the wrong function in Lua.

Bug: 51886
Change-Id: I4f15841051f7748d1d6df24080949e5cbd88f217
2014-02-25 22:59:05 +00:00
common Use the new limit report hooks 2014-02-10 04:11:35 +00:00
engines LuaStandalone: Release functions when no longer referenced 2014-02-25 22:59:05 +00:00
modules Clean up existing code and pass jshint 2013-12-13 00:50:13 +01:00
tests/engines LuaStandalone: Release functions when no longer referenced 2014-02-25 22:59:05 +00:00
.gitignore Update ignores for some emacs tmp files 2013-07-25 13:11:50 -04:00
.gitreview
.jshintrc Add .jshintrc file 2013-12-11 00:06:41 +01:00
composer.json Add composer.json file 2014-01-29 20:07:55 +01:00
Scribunto.i18n.php Localisation updates from https://translatewiki.net. 2014-02-25 20:08:28 +00:00
Scribunto.magic.php Localisation updates from https://translatewiki.net. 2014-02-19 20:10:21 +00:00
Scribunto.namespaces.php Namespace translation for Urdu 2014-02-25 14:04:39 +01:00
Scribunto.php Use the new limit report hooks 2014-02-10 04:11:35 +00:00