The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: cym224@gmail.com (Nemo)
Subject: [TUHS] TUHS Digest, Vol 128, Issue 1
Date: Fri, 11 Sep 2015 08:21:17 -0400	[thread overview]
Message-ID: <CAJfiPzwZWT8h5Cn75eNHs_vOVnGyu+5CpQjn4oVAatfgjd=XMw@mail.gmail.com> (raw)
In-Reply-To: <CAMYpm87tBZ_P=W10O72sgoPNtK53M1SL+P_EfS=Dfy9NB7ZVcQ@mail.gmail.com>

On 11 September 2015 at 02:21, Rudi Blom <rudi.j.blom at gmail.com> 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.



  reply	other threads:[~2015-09-11 12:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1.1441936807.9984.tuhs@minnie.tuhs.org>
2015-09-11  6:21 ` Rudi Blom
2015-09-11 12:21   ` Nemo [this message]
2015-09-11 13:17   ` Warner Losh

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='CAJfiPzwZWT8h5Cn75eNHs_vOVnGyu+5CpQjn4oVAatfgjd=XMw@mail.gmail.com' \
    --to=cym224@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).