lua-users home
lua-l archive

Re: Is there a (simple) way to get the memory usage of a Lua object (e.g table)?

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 2020年9月27日 at 11:50, Matthew Wild <mwild1@gmail.com> wrote:
> However in most applications if there are objects that are referenced
> by the table (and possibly *only* by the table) you likely want to
> include the size of those objects too.
>
> > I'd like to find out how much memory a Lua table is using - without
> > iterating through the table contents and counting up the usage.
Sorry, hit send too early. Was going to say here, there is no way to
add up all the sizes of these referenced objects without iteration.
Regards,
Matthew

AltStyle によって変換されたページ (->オリジナル) /