From mboxrd@z Thu Jan 1 00:00:00 1970 From: cym224@gmail.com (Nemo) Date: Fri, 11 Sep 2015 08:21:17 -0400 Subject: [TUHS] TUHS Digest, Vol 128, Issue 1 In-Reply-To: References: Message-ID: On 11 September 2015 at 02:21, Rudi Blom wrote (in part): > I never used realloc(), only malloc() and calloc(). > > Checking a few unixes I have access to all reallocs() seem to state > either nothing on contents of memory added or state explicitly > 'undefined'. To be pedantic, if it's POSIX then: (from http://pubs.opengroup.org/onlinepubs/9699919799/) The contents of the new object shall be the same as that of the old object prior to deallocation, up to the lesser of the new and old sizes. Any bytes in the new object beyond the size of the old object have indeterminate values. N.