aboutsummaryrefslogtreecommitdiffstats
path: root/bruiser/lua-scripts/demo1.lua
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-05-20 20:51:17 +0000
committerbloodstalker <thabogre@gmail.com>2018-05-20 20:51:17 +0000
commit105bc30b01d01d08e1b87c2f07cc7fc737811563 (patch)
tree9572084e59be03dac5f9c844e50e362d5382ec16 /bruiser/lua-scripts/demo1.lua
parentfixes #33. fixed #34. python interpreter should clean up after itself properl... (diff)
downloadmutator-105bc30b01d01d08e1b87c2f07cc7fc737811563.tar.gz
mutator-105bc30b01d01d08e1b87c2f07cc7fc737811563.zip
wip:added a wasm backend. i need to setup an interface with the main c++ code. added some commands to bruiser for managing xobj memories
Diffstat (limited to '')
-rw-r--r--bruiser/lua-scripts/demo1.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/bruiser/lua-scripts/demo1.lua b/bruiser/lua-scripts/demo1.lua
index 6f02860..964fd81 100644
--- a/bruiser/lua-scripts/demo1.lua
+++ b/bruiser/lua-scripts/demo1.lua
@@ -121,7 +121,7 @@ function printFuncSizes()
end
end
-function main()
+function demo1()
pwd()
printObjNames()
printObjSizes()
@@ -209,8 +209,14 @@ local C_main_code = codeTableByName("'main'")
a = xobjlist()
print("the offset of quad and add2 is : ", a["quad"] - a["add2"])
+ mem_size = xmemusage()
+ print("memory used "..mem_size)
+ xclear()
+ mem_size = xmemusage()
+ print("memory used "..mem_size)
+
end
-main()
+demo1()
--------------------------------------------------------------------------------------------------------------