From: Andreas Ericsson <ae@op5.se>
To: Brandon Casey <casey@nrlssc.navy.mil>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] Replace xmalloc/memset(0) pairs with xcalloc
Date: Tue, 07 Oct 2008 07:12:14 +0200 [thread overview]
Message-ID: <48EAEFAE.3010504@op5.se> (raw)
In-Reply-To: <48R7WYLSZ5lElWvJbfurso2ZPBQbzSCmtOgIsqTWyaA8yfW6Ndq1aA@cipher.nrlssc.navy.mil>
Brandon Casey wrote:
> Many call sites immediately initialize allocated memory with zero after
> calling xmalloc. A single call to xcalloc can replace this two-call
> sequence.
>
Nicely done. Apart from reducing LoC count, this is also a slight
optimization as we'll no longer bzero() memory handed to us directly
by the kernel (which is already nul'ed out).
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
prev parent reply other threads:[~2008-10-07 5:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-06 23:39 [PATCH] Replace xmalloc/memset(0) pairs with xcalloc Brandon Casey
2008-10-07 5:12 ` Andreas Ericsson [this message]
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=48EAEFAE.3010504@op5.se \
--to=ae@op5.se \
--cc=casey@nrlssc.navy.mil \
--cc=git@vger.kernel.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.