From owner-cvs-all@FreeBSD.ORG Sun Mar 19 18:28:07 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE2A116A401; Sun, 19 Mar 2006 18:28:07 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 408F743D5A; Sun, 19 Mar 2006 18:28:07 +0000 (GMT) (envelope-from jasone@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k2JIS7sF019142; Sun, 19 Mar 2006 18:28:07 GMT (envelope-from jasone@repoman.freebsd.org) Received: (from jasone@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k2JIS7YL019141; Sun, 19 Mar 2006 18:28:07 GMT (envelope-from jasone) Message-Id: <200603191828.k2JIS7YL019141@repoman.freebsd.org> From: Jason Evans Date: Sun, 19 Mar 2006 18:28:07 +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-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Mar 2006 18:28:07 -0000 jasone 2006-03-19 18:28:07 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Optimize realloc() to reallocate in place if the old and new sizes are close enough to each other that reallocation would allocate a new region of the same size. This improves the performance of repeated incremental reallocations by up to three orders of magnitude. [1] Fix arena_new() to properly constrain run size if a small chunk size was specified during runtime configuration. Suggested by: se [1] Revision Changes Path 1.113 +167 -105 src/lib/libc/stdlib/malloc.c