projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b316be
)
libs/lucid: perform full gc cycle prior to forking, massively improves memory consumption
author
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 22 Jul 2011 13:59:29 +0000
(13:59 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 22 Jul 2011 13:59:29 +0000
(13:59 +0000)
libs/lucid/luasrc/lucid.lua
patch
|
blob
|
history
diff --git
a/libs/lucid/luasrc/lucid.lua
b/libs/lucid/luasrc/lucid.lua
index 5d62a6cd8f4a1bfae01598fbb434eb3302c9919a..7ecdf2acd788d0be2edb47c76f3d0e187a9ea1b9 100644
(file)
--- a/
libs/lucid/luasrc/lucid.lua
+++ b/
libs/lucid/luasrc/lucid.lua
@@
-136,7
+136,6
@@
function run()
end
elseif stat == 0 then
ifaddrs = nixio.getifaddrs()
- collectgarbage("collect")
end
for _, cb in ipairs(tickt) do
@@
-231,6
+230,8
@@
function create_process(threadcb, waitcb)
if threadlimit and tcount >= threadlimit then
nixio.syslog("warning", "Cannot create thread: process limit reached")
return nil
+ else
+ collectgarbage("collect")
end
local pid, code, err = nixio.fork()
if pid and pid ~= 0 then