[Tarantool-patches] [PATCH v2 06/16] port: increase padding of struct port
Konstantin Osipov
kostja.osipov at gmail.com
Wed Dec 4 14:42:27 MSK 2019
* Nikita Pettik <korablev at tarantool.org> [19/11/21 10:00]:
> We are going to extend context of struct port_sql. One already inherits
> struct port_tuple, which makes it size barely fits into 48 bytes of
> padding of basic structure (struct port). Hence, let's increase padding
> a bit to be able to add at least one more member to struct port_sql.
This is very verbose but still unclear :) What makes you certain 4
bytes is enough? Be it a pointer or integer, it may be 4 or 8
bytes depending on the platform.
Please explain.
Otherwise lgtm.
> ---
> src/lib/core/port.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lib/core/port.h b/src/lib/core/port.h
> index d61342287..bfdfa4656 100644
> --- a/src/lib/core/port.h
> +++ b/src/lib/core/port.h
> @@ -122,7 +122,7 @@ struct port {
> * Implementation dependent content. Needed to declare
> * an abstract port instance on stack.
> */
> - char pad[48];
> + char pad[52];
> };
>
> /** Is not inlined just to be exported. */
> --
> 2.15.1
>
--
Konstantin Osipov, Moscow, Russia
More information about the Tarantool-patches
mailing list