[Tarantool-patches] [PATCH v4 4/6] sql: use parser's region of "index" array
Roman Khabibov
roman.habibov at tarantool.org
Wed Sep 23 17:25:06 MSK 2020
Hi Thanks for the review.
> On Sep 17, 2020, at 17:53, Vladislav Shpilevoy <v.shpilevoy at tarantool.org> wrote:
>
> Thanks for the patch!
>
> On 11.09.2020 23:51, Roman Khabibov wrote:
>> Allocate memory for the "index" array of ephemeral space on the
>> parser's region instead of a heap as it was before. Fixed a memory
>> leak that realloc() generated.
>
> You need to provide more info why it can't be stored on the heap,
> and why free() can't be simply called somewhere.
Actually, it can be stored on the heap. I thought that getting rid
of malloc/free is the main point of using region. The region is also
well suited for this task, because space-> index is information that
is needed only for parsing and should be destroyed with parsed. I dropped
this patch and added free in the new patch.
More information about the Tarantool-patches
mailing list