[TUHS] Did realloc ever zero the new memory?
lm at mcvoy.com
Fri Sep 11 06:27:23 AEST 2015
Good, glad to know it wasn't just me. I've finally let my team use it
but we avoided it when we supported more odd ball platforms.
On zero fill, I doubt many did that. Many really early on when memory
What you might be thinking of is modern systems implement malloc()
as an mmap of /dev/zero and the initial data comes through as zeroed.
But counting on that would be a mistake.
On Thu, Sep 10, 2015 at 01:22:33PM -0700, David wrote:
> Buggy, sure.
> Zero (less) filling, that is the question.
> Realloc has had a difficult history, and I try to avoid it if at all possible.
> > On Sep 10, 2015, at 1:21 PM, Larry McVoy <lm at mcvoy.com> wrote:
> > Am I the only one that remembers realloc() being buggy on some systems?
Larry McVoy lm at mcvoy.com http://www.mcvoy.com/lm
More information about the TUHS