[Tarantool-patches] [PATCH small 1/1] region: new region_alloc_array, updated alloc_object
Aleksandr Lyapunov
alyapunov at tarantool.org
Mon May 25 09:52:15 MSK 2020
Thanks for the patch! See 1 comment below:
On 5/21/20 11:32 PM, Vladislav Shpilevoy wrote:
> Also the patch adds an out parameter 'size' for both macros. It
> simplifies total size calculation, which is needed almost always,
> because total size is included into an error message, if the
> allocation fails.
I don't like the size returning. Even for array allocation it looks
annoying.
It's too easy to calculate the size, and compilers will omit the second
multiplication with the same args.
For single allocation it looks ugly. It's not even a calculation.
More information about the Tarantool-patches
mailing list