From owner-cvs-src@FreeBSD.ORG Tue Apr 4 03:51:47 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA9F416A41F; Tue, 4 Apr 2006 03:51:47 +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 6BEFF43D46; Tue, 4 Apr 2006 03:51:47 +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 k343pliN095043; Tue, 4 Apr 2006 03:51:47 GMT (envelope-from jasone@repoman.freebsd.org) Received: (from jasone@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k343pl5k095042; Tue, 4 Apr 2006 03:51:47 GMT (envelope-from jasone) Message-Id: <200604040351.k343pl5k095042@repoman.freebsd.org> From: Jason Evans Date: Tue, 4 Apr 2006 03:51:47 +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: Tue, 04 Apr 2006 03:51:47 -0000 jasone 2006-04-04 03:51:47 UTC FreeBSD src repository Modified files: lib/libc/stdlib malloc.c Log: Refactor per-run bitmap manipulation functions so that bitmap offsets only have to be calculated once per allocator operation. Make nil const. Update various comments. Remove/avoid division where possible. For the one division operation that remains in the critical path, add a switch statement that has a case for each small size class, and do division with a constant divisor in each case. This allows the compiler to generate optimized code that does not use hardware division [1]. Obtained from: peter [1] Revision Changes Path 1.121 +131 -69 src/lib/libc/stdlib/malloc.c