Tarantool development patches archive
 help / color / mirror / Atom feed
From: Aleksandr Lyapunov <alyapunov@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
	tarantool-patches@dev.tarantool.org, tsafin@tarantool.org
Subject: Re: [Tarantool-patches] [PATCH small 1/1] region: new region_alloc_array, updated alloc_object
Date: Mon, 25 May 2020 09:52:15 +0300	[thread overview]
Message-ID: <2914883e-7c71-fd12-0512-5a2e92543efb@tarantool.org> (raw)
In-Reply-To: <fc75e99f5b2a695c9f52db78198ea7ada7ef6a82.1590093078.git.v.shpilevoy@tarantool.org>

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.

  reply	other threads:[~2020-05-25  6:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21 20:32 Vladislav Shpilevoy
2020-05-25  6:52 ` Aleksandr Lyapunov [this message]
2020-05-27  0:00   ` Vladislav Shpilevoy
2020-06-05 12:11     ` Timur Safin
2020-06-03 21:27 ` Vladislav Shpilevoy
2020-06-05 12:12   ` Timur Safin

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=2914883e-7c71-fd12-0512-5a2e92543efb@tarantool.org \
    --to=alyapunov@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=tsafin@tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH small 1/1] region: new region_alloc_array, updated alloc_object' \
    /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