Date: Wed, 13 Jun 2007 00:38:38 -0700 From: Garrett Cooper <youshi10@u.washington.edu> To: freebsd-hackers@freebsd.org Subject: Re: Reason for doing malloc / bzero over calloc (performance)? Message-ID: <466F9EFE.9020402@u.washington.edu> In-Reply-To: <466F7FD1.2020303@u.washington.edu> References: <466F7FD1.2020303@u.washington.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Garrett Cooper wrote: > Title says it all -- is there a particular reason why malloc/bzero > should be used instead of calloc? > -Garrett As someone just brought to my attention, I should do some Googling. Initial results brought up this: <http://boredzo.org/blog/archives/2006-11-26/calloc-vs-malloc>. I would like to provide results for CURRENT, but I don't know offhand what C interface right supports nanoseconds or microseconds precision timing in FreeBSD (apart from just doing nanosleeps, which isn't such a great idea and can drift I would think due to clock skew). The original author's solution is for Mac OSX only :(.. I think it's decided though -- calloc for now wins over malloc / bzero, so I'm going to change that alloc/bzero to reflect the change. -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?466F9EFE.9020402>