Date: Tue, 4 Apr 2006 03:51:47 +0000 (UTC) From: Jason Evans <jasone@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libc/stdlib malloc.c Message-ID: <200604040351.k343pl5k095042@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604040351.k343pl5k095042>