Lua Memory Usage on function calls
1 Attachment(s)
Hey Guys,
i made a little Addon to analyze the Memory usage of Lua. While playing around a little bit with it, i noticed, that every function call consumes a bit of Memory wich isnt get freed after function ended. e.g. Lua Code:
functions: /mu start [time in ms] -- starts the memory display (default 500 ms) /mu stop -- hides the memory display and stops at next interval /mu collect -- collects the garbage and displays the freed memory in Chat Here is the Memory Usage Addon if someone wants to check: Attachment 444 |
As long as garbage is collected at some point, it's ok. Immediate collection is IMO only possible with reference-counting (such as in Python); which Lua doesn't use because it poses much bigger problems than delayed collection :) http://lua-users.org/wiki/GarbageCollectionTutorial
|
Quote:
|
This was great!!!!
Quote:
|
All times are GMT -6. The time now is 06:58 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI