From owner-freebsd-hackers Sat Sep 28 09:54:38 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA16231 for hackers-outgoing; Sat, 28 Sep 1996 09:54:38 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA16188 for ; Sat, 28 Sep 1996 09:54:32 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.7.6/8.6.9) id CAA00660; Sun, 29 Sep 1996 02:51:26 +1000 Date: Sun, 29 Sep 1996 02:51:26 +1000 From: Bruce Evans Message-Id: <199609281651.CAA00660@godzilla.zeta.org.au> To: FreeBSD-hackers@FreeBSD.org, guido@gvr.win.tue.nl Subject: Re: stack Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk >When I allocate something on the stack, isn't it supposed to be completely >zero? Certainly not. >like: >main(int argc, char **argv) { > char buf[1000]; > >... >} > >Then buf should be zero, or am I missing something here? Stack variables in main() are often zero under multi-tasking systems because the system starts processes with clean pages for security reasons and nothing has used the stack yet. Bruce