Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760152AbXF0FEW (ORCPT ); Wed, 27 Jun 2007 01:04:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753615AbXF0FEN (ORCPT ); Wed, 27 Jun 2007 01:04:13 -0400 Received: from nz-out-0506.google.com ([64.233.162.236]:32775 "EHLO nz-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753178AbXF0FEM (ORCPT ); Wed, 27 Jun 2007 01:04:12 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=X/aCP2ASGJsi9cuq0tNdfW8jIKzenNbgLkpW7qs2JOhtsNQAeU/aVoTeoTSzZhJlPIkdmWze0C485QPdLEWV4v7G3Da+fOsDjIeaIuAmsIoNQkMOemRySLyYuO5XYyfw0NZ+/o4k3uvNJOozzmfa4SjKz2aYvL2jAIn1633sLtI= Message-ID: Date: Tue, 26 Jun 2007 22:04:11 -0700 From: "Ulrich Drepper" To: "Rik van Riel" Subject: Re: [patch 2/3] MAP_NOZERO - implement sys_brk2() Cc: "Davide Libenzi" , "Linux Kernel Mailing List" In-Reply-To: <4681E37A.9090708@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4681D45F.7080309@redhat.com> <4681E37A.9090708@redhat.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 757 Lines: 20 On 6/26/07, Rik van Riel wrote: > After going through the first malloc()/free() cycle, surely > the memory will no longer be zeroed on the second malloc() ? If returned to the system, sure. > What makes the first brk malloc so special? If the memory is zeroed it needs not be initialized by malloc. No calloc zeroing, no pointer clearing. Anyway, it's irrelevant what the benefits are, the fact is current code depends on brk to zero the memory and you'd break the ABI if you'd change it. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/