🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3090

What does malloc(0) return?

#3090
From: Steve Emmerson
Date: Fri, 31 May 1991 17:25
9 lines
695 bytes
Greetings,

The subject-line says it all and my K&R2 is silent on the matter.
Is the answer NULL, non-NULL (but don't dereference), undefined,
or implementation-defined?

Thanks in advance.

Steve Emmerson        steve@unidata.ucar.edu        ...!ncar!unidata!steve
Technical Details
Message-ID: <11614@ncar.ucar.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!unidata.ucar.edu!steve

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!unidata.ucar.edu!steve
From: steve@unidata.ucar.edu (Steve Emmerson)
Newsgroups: comp.std.c
Subject: What does malloc(0) return?
Message-ID: <11614@ncar.ucar.edu>
Date: 31 May 91 17:25:52 GMT
Sender: news@ncar.ucar.edu
Reply-To: steve@unidata.ucar.edu (Steve Emmerson)
Distribution: na
Organization: Unidata/UCAR, Boulder CO
Lines: 9