9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Mike Haertel <mike@ducky.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] thornbird (another xscreensaver hack)
Date: Fri, 21 Jun 2002 18:21:08 -0700	[thread overview]
Message-ID: <200206220121.g5M1L8Wu022027@ducky.net> (raw)
In-Reply-To: <b9f6e71885e65d570f85eeebbaf4c13d@plan9.bell-labs.com>

>I don't believe there is any requirement in the
>C standard (although I haven't checked) for the returned memory to
>be zeroed. A check of the 2 non-Plan 9 systems I have handy (Linux,
>Irix) show one will zero the memory and one won't.

The C standard specifically states that memory returned by malloc()
should be assumed to contain garbage.

Arguably any system library in which malloc() returns zeroed memory
should be considered broken in the sense that it may give people
the wrong expectation about the standard behavior.


  reply	other threads:[~2002-06-22  1:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-21 23:02 jmk
2002-06-22  1:21 ` Mike Haertel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-06-24  5:40 David Gordon Hogan
2002-06-24  0:51 okamoto
2002-06-22 12:39 Tiit Lankots
2002-06-22  1:45 jmk
2002-06-21 22:57 David Gordon Hogan
2002-06-22  7:42 ` Fariborz Tavakkolian
2002-06-21 22:41 andrey mirtchovski
2002-06-21 22:37 jmk
2002-06-21 22:21 andrey mirtchovski

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=200206220121.g5M1L8Wu022027@ducky.net \
    --to=mike@ducky.net \
    --cc=9fans@cse.psu.edu \
    /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).