From owner-freebsd-questions@FreeBSD.ORG Sun Oct 5 20:20:46 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 12CB816A4B3 for ; Sun, 5 Oct 2003 20:20:46 -0700 (PDT) Received: from smtp03.mrf.mail.rcn.net (smtp03.mrf.mail.rcn.net [207.172.4.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6362743FCB for ; Sun, 5 Oct 2003 20:20:45 -0700 (PDT) (envelope-from roberthuff@rcn.com) Received: from 209-6-197-67.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.197.67] helo=jerusalem.litteratus.org.litteratus.org) by smtp03.mrf.mail.rcn.net with esmtp (Exim 3.35 #4) id 1A6LvQ-00053D-00 for questions@freebsd.org; Sun, 05 Oct 2003 23:20:44 -0400 From: Robert Huff MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16256.57227.924291.290786@jerusalem.litteratus.org> Date: Sun, 5 Oct 2003 23:20:43 -0400 To: questions@freebsd.org In-Reply-To: <20031006030656.GK5283@dan.emsphone.com> References: <27DDB356-F790-11D7-9174-003065838A88@mulle-kybernetik.com> <20031006030656.GK5283@dan.emsphone.com> X-Mailer: VM 7.14 under 21.5 (beta15) "celery" XEmacs Lucid Subject: malloc() behavior (was: Pointer please) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2003 03:20:46 -0000 Dan Nelson writes: > Could be one of two problems. The program either malloced memory > and tried to use it without zeroing it, or it freed some memory > and tried to keep using it. In -current, the malloc has the J > debugging flag set, which fills malloced and freed memory with > 0xd0 (see the malloc manpage). On that page (on my 5.1 system), it says malloc() does not zero allocated pages. Is this a change (possibly just for CURRENT), and if so since when? Bexause unless I'm delusional (possible) I thought pages /were/ supposed to be zeroed, and doing so was one of the system's "as time permits" chores. Robert Huff