From: Sasha Khapyorsky <sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org>
To: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] opensm/osm_ucast_updn.c: Reduce temporary allocation of cas_per_sw
Date: Wed, 14 Oct 2009 16:34:23 +0200 [thread overview]
Message-ID: <20091014143423.GC13830@me> (raw)
In-Reply-To: <f0e08f230910140633i43bd7648w1feba7c2be6c0d11-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 09:33 Wed 14 Oct , Hal Rosenstock wrote:
> On Wed, Oct 14, 2009 at 9:29 AM, Sasha Khapyorsky <sashak-smomgflXvObQFizaE/u3fw@public.gmane.orgm> wrote:
> > On 09:14 Wed 14 Oct , Hal Rosenstock wrote:
> >>
> >> Also, combine malloc/memset into calloc
> >
> > Any special reason for malloc/calloc change?
>
> It's a little more concise and efficient to calloc rather than
> malloc/memset.
Why do you think so? Normally calloc() is malloc() + memset() - you
just get extra call and extra check.
> Any reason not to do this ?
Above.
calloc() can be nicer in some cases and pretty common, feel free to use
it when appropriate. But I don't think that we need to make a global
malloc() -> calloc() conversion without any good reason.
Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-10-14 14:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-14 13:14 [PATCH] opensm/osm_ucast_updn.c: Reduce temporary allocation of cas_per_sw Hal Rosenstock
[not found] ` <20091014131435.GA23890-Wuw85uim5zDR7s880joybQ@public.gmane.org>
2009-10-14 13:29 ` Sasha Khapyorsky
2009-10-14 13:33 ` Hal Rosenstock
[not found] ` <f0e08f230910140633i43bd7648w1feba7c2be6c0d11-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-14 14:34 ` Sasha Khapyorsky [this message]
2009-10-14 14:36 ` Hal Rosenstock
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=20091014143423.GC13830@me \
--to=sashak-smomgflxvozwk0htik3j/w@public.gmane.org \
--cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.