From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 10 23:24:38 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D11216A41C for ; Fri, 10 Jun 2005 23:24:38 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from smtp3.server.rpi.edu (smtp3.server.rpi.edu [128.113.2.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF01343D53 for ; Fri, 10 Jun 2005 23:24:37 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp3.server.rpi.edu (8.13.0/8.13.0) with ESMTP id j5ANOYRQ023397; Fri, 10 Jun 2005 19:24:35 -0400 Mime-Version: 1.0 Message-Id: In-Reply-To: <20050610224058.GA11336@malcolm.berkeley.edu> References: <20050610224058.GA11336@malcolm.berkeley.edu> Date: Fri, 10 Jun 2005 19:24:33 -0400 To: Mike Hunter , freebsd-hackers@freebsd.org From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanItPRO-Stream: default X-RPI-SA-Score: undef - spam-scanning disabled X-Scanned-By: CanIt (www . canit . ca) on 128.113.2.3 Cc: Subject: Re: unitialized memory is all zeros...why not garbage instead? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2005 23:24:38 -0000 At 3:40 PM -0700 6/10/05, Mike Hunter wrote: >Hey everybody, > >I have a feeling that I'm missing something really obvious, but >I'm having trouble understanding why the following program: >Never prints anything but "0"'s. Kernel generally clears out memory in the background. See also the man page for 'malloc', which will describe some options that you can set by creating an appropriate symlink at /etc/malloc.conf. In particular, the -J flag. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu