[Tarantool-patches] [PATCH luajit v1 03/11] profile: introduce profiler writing module

Igor Munkin imun at tarantool.org
Fri Dec 25 12:37:24 MSK 2020


Sergey,

On 25.12.20, Sergey Kaplun wrote:
> On 24.12.20, Sergey Ostanevich wrote:

<snipped>

> > 
> > +void lj_wbuf_init(struct lj_wbuf *buf, lj_wbuf_writer writer, void *ctx,
> > +                 uint8_t *mem, size_t size)
> > +{
> > +  lua_assert(size >= LEB128_U64_MAXSIZE);
> > 
> > Is it meaningful to allocate just 10bytes?
> 
> No, but at least we should check it. We need at least 10bytes buffer to
> write huge addresses leb128-encoded.

Again, this is a *general purpose write buffer*, so I agree with Sergos,
that this assert looks odd here.

> 

<snipped>

> 
> -- 
> Best regards,
> Sergey Kaplun

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list