On every system that I've ever used, I believe that realloc did not do a zero fill.
There might have been a time when malloc did a zero fill, but I never counted on it. I
always performed a memset or bzero after a malloc. I'm pretty sure that I counted on
realloc to NOT perform a zero fill.
$.02
From: "David" <david(a)kdbarto.org>
To: tuhs(a)minnie.tuhs.org
Sent: Thursday, September 10, 2015 3:52:45 PM
Subject: [TUHS] Did realloc ever zero the new memory?
I’ve just had a discussion with my boss about this and he claimed that it did at one point
and I said it hasn’t in all the unix versions I’ve ever played with (v6, v7, sys III, V,
BSD 2, 3, 4, SunOS and Solaris).
My question to this illustrious group is: Did any Unix or Unix like OS ever zero fill on
realloc?
David
_______________________________________________
TUHS mailing list
TUHS(a)minnie.tuhs.org
https://minnie.tuhs.org/mailman/listinfo/tuhs