[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: heap allocation time?
- From: Daurnimator <quae@...>
- Date: Wed, 1 Mar 2017 14:54:38 +1100
On 1 March 2017 at 08:56, Valerio Schiavoni <email@example.com> wrote:
> is it possible somehow to measure how much time the LuaVM spends to allocate
> heap memory during the execution of a program?
> Is there some debug flag that shows this information?
You could do so by writing own allocator that takes a timing measurements.
You can either use lua_setallocf() if you're wrapping the existing
allocator, or otherwise pass your own allocator to lua_newstate().