diff etc/check-memory.lua @ 0:4b915342e2a8

LuaSocket 2.0.2 + CMake build description.
author Eric Wing <ewing . public |-at-| gmail . com>
date Tue, 26 Aug 2008 18:40:01 -0700
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/check-memory.lua	Tue Aug 26 18:40:01 2008 -0700
@@ -0,0 +1,17 @@
+function load(s)
+    collectgarbage()
+    local a = gcinfo()
+    _G[s] = require(s)
+    collectgarbage()
+    local b = gcinfo()
+    print(s .. ":\t " .. (b-a) .. "k")
+end
+
+load("socket.url")
+load("ltn12")
+load("socket")
+load("mime")
+load("socket.tp")
+load("socket.smtp")
+load("socket.http")
+load("socket.ftp")