From: "Timur Safin" <tsafin@tarantool.org> To: 'Vladislav Shpilevoy' <v.shpilevoy@tarantool.org>, 'Aleksandr Lyapunov' <alyapunov@tarantool.org>, tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH small 1/1] region: new region_alloc_array, updated alloc_object Date: Fri, 5 Jun 2020 15:11:52 +0300 [thread overview] Message-ID: <02db01d63b32$7f592300$7e0b6900$@tarantool.org> (raw) In-Reply-To: <7c6d16bd-b943-63d6-97e6-b7ef2d9ee8c9@tarantool.org> : From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> : Subject: Re: [PATCH small 1/1] region: new region_alloc_array, updated : alloc_object : ... : Worse again it becomes, when size is needed not only in diag, but : also in case of success. For example, to make a memset(0). In this : case it is either triple code duplication, or double code duplication : but with size_t size/bsize variable anyway. : : region_alloc_object() got the out parameter to be consistent with : region_alloc_array(). : : I tried removing the out parameter, and it started looking worse. Agreed, that if extra macro argument `size` would simplify the code then it's a good thing, despite all apparent ugliness. Timur
next prev parent reply other threads:[~2020-06-05 12:11 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 2020-05-27 0:00 ` Vladislav Shpilevoy 2020-06-05 12:11 ` Timur Safin [this message] 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='02db01d63b32$7f592300$7e0b6900$@tarantool.org' \ --to=tsafin@tarantool.org \ --cc=alyapunov@tarantool.org \ --cc=tarantool-patches@dev.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