[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Tracking memory usage
- From: Matthew Wild <mwild1@...>
- Date: Fri, 14 Sep 2012 14:21:08 +0100
On 13 September 2012 19:48, Paul K <paulclinger@yahoo.com> wrote:
> Just one quick note: to be able to implement getsize in Lua, it would
> be convenient to have a function in debug namespace that would return
> an array with all sizeof values for various types. I think everything
> else can be calculated (or at least estimated from Lua).
Yes, it could do that. It won't be quite as accurate though. For
example you can't get the memory consumed by empty table slots in Lua
(unless a function for this was exposed to Lua also). Ultimately I
decided it was just simpler to keep all that logic in C and expose one
simple generic function to Lua.
Regards,
Matthew