Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH 1/1] small: introduce static allocator
Date: Sat, 4 May 2019 00:36:13 +0300	[thread overview]
Message-ID: <20190503213613.GA16696@atlas> (raw)
In-Reply-To: <3ae3f8b3-fb07-5925-27d7-168e857b9d62@tarantool.org>

* Vladislav Shpilevoy <v.shpilevoy@tarantool.org> [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

  reply	other threads:[~2019-05-03 21:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-28 18:41 [tarantool-patches] " Vladislav Shpilevoy
2019-05-02 15:43 ` [tarantool-patches] " Vladislav Shpilevoy
2019-05-03 21:26 ` Konstantin Osipov
2019-05-03 21:32   ` Vladislav Shpilevoy
2019-05-03 21:36     ` Konstantin Osipov [this message]
2019-05-03 23:49       ` Vladislav Shpilevoy
2019-05-04  6:50         ` Konstantin Osipov
2019-05-04 18:09           ` Vladislav Shpilevoy
2019-05-04  6:53         ` Konstantin Osipov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190503213613.GA16696@atlas \
    --to=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='[tarantool-patches] Re: [PATCH 1/1] small: introduce static allocator' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox