From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 8889D2E9E1 for ; Fri, 3 May 2019 17:36:16 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T1ONdfcsFEZb for ; Fri, 3 May 2019 17:36:16 -0400 (EDT) Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [94.100.177.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 3614A2E97E for ; Fri, 3 May 2019 17:36:16 -0400 (EDT) Date: Sat, 4 May 2019 00:36:13 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 1/1] small: introduce static allocator Message-ID: <20190503213613.GA16696@atlas> References: <50ba091077c074c4eecc1ee63f53d2f4f245bd51.1556466730.git.v.shpilevoy@tarantool.org> <20190503212635.GA16185@atlas> <3ae3f8b3-fb07-5925-27d7-168e857b9d62@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3ae3f8b3-fb07-5925-27d7-168e857b9d62@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: Vladislav Shpilevoy Cc: tarantool-patches@freelists.org * Vladislav Shpilevoy [19/05/04 00:34]: > > OK to push. > > > > Shouldn't you align the address or provide an aligned alloc along > > with the basic one? > > I thought about a function like static_aligned_alloc just like we > have for region, but was not sure if we need it now. There are no > code uses old tt_static_buf for data needed alignment. I hoped we > could implement it on demand. > > But if you think we should implement it now, I can do that. > Should I? Previously tt_static_buf allocations were always aligned, since the next alloc would always allocate at position 0 in the buffer. Now you provide a general purpose alloc more or less, which can start at any position in the buffer. I would simple ensure that static_alloc() is intptr_t aligned. We can add an aligned alloc later. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32