From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 3F4094696C0 for ; Fri, 13 Dec 2019 16:54:08 +0300 (MSK) Date: Fri, 13 Dec 2019 16:54:06 +0300 From: Nikita Pettik Message-ID: <20191213135406.GA79679@tarantool.org> References: <20191204114227.GH6592@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191204114227.GH6592@atlas> Subject: Re: [Tarantool-patches] [PATCH v2 06/16] port: increase padding of struct port List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Konstantin Osipov , tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org On 04 Dec 14:42, Konstantin Osipov wrote: > * Nikita Pettik [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. Because I'm adding two 1-byte members (uint8_t). Two additional bytes just to avoid another one size patching in case smb needs more space. > 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