From owner-cvs-src@FreeBSD.ORG Thu Feb 22 19:10:30 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E97C216A403; Thu, 22 Feb 2007 19:10:30 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id C527513C47E; Thu, 22 Feb 2007 19:10:30 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l1MJAU3q064097; Thu, 22 Feb 2007 19:10:30 GMT (envelope-from jasone@repoman.freebsd.org) Received: (from jasone@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l1MJAULF064096; Thu, 22 Feb 2007 19:10:30 GMT (envelope-from jasone) Message-Id: <200702221910.l1MJAULF064096@repoman.freebsd.org> From: Jason Evans Date: Thu, 22 Feb 2007 19:10:30 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libc/stdlib malloc.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Feb 2007 19:10:31 -0000 jasone 2007-02-22 19:10:30 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Modify chunk_alloc() to prefer mmap()ed memory over sbrk()ed memory. This has no impact unless USE_BRK is defined (32-bit platforms), in which case user allocations are allocated via mmap() if at all possible, in order to avoid the possibility of unreclaimable chunks in the data segment. Fix an obscure bug in base_alloc() that could have allowed undefined behavior if an application were to use sbrk() in conjunction with a USE_BRK-enabled malloc. Revision Changes Path 1.140 +40 -36 src/lib/libc/stdlib/malloc.c