Date: Sat, 28 Sep 1996 18:37:22 +0200 From: roberto@keltia.freenix.fr (Ollivier Robert) To: FreeBSD-hackers@freebsd.org (FreeBSD-hackers) Subject: Re: stack Message-ID: <199609281637.SAA01298@keltia.freenix.fr> In-Reply-To: <199609281520.RAA05793@gvr.win.tue.nl>; from Guido van Rooij on Sep 28, 1996 17:20:52 %2B0200 References: <199609281520.RAA05793@gvr.win.tue.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
According to Guido van Rooij:
> When I allocate something on the stack, isn't it supposed to be completely
> zero?
> like:
> main(int argc, char **argv) {
> char buf[1000];
As John said, first time it will be zeroed but remember that automatic
arrays are not supposed to be cleared at all if I remember well ANSI C...
Always clear them if you depend on it.
--
Ollivier ROBERT -=- The daemon is FREE! -=- roberto@keltia.freenix.fr
FreeBSD keltia.freenix.fr 2.2-CURRENT #0: Sat Sep 21 00:18:27 MET DST 1996
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609281637.SAA01298>
