From dev-return-18638-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Wed Jul 11 18:59:52 2007 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 38718 invoked from network); 11 Jul 2007 18:59:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jul 2007 18:59:51 -0000 Received: (qmail 37906 invoked by uid 500); 11 Jul 2007 18:59:54 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 37670 invoked by uid 500); 11 Jul 2007 18:59:52 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 37658 invoked by uid 99); 11 Jul 2007 18:59:52 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2007 11:59:52 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [65.99.219.155] (HELO haxent.com) (65.99.219.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2007 11:59:48 -0700 Received: from karmic-2.local (unknown [201.21.180.98]) by haxent.com (Postfix) with ESMTP id 02CAE30855 for ; Wed, 11 Jul 2007 15:59:26 -0300 (BRT) Message-ID: <4695288A.6020400@haxent.com.br> Date: Wed, 11 Jul 2007 15:59:22 -0300 From: Davi Arnaut MIME-Version: 1.0 To: dev@apr.apache.org Subject: apr_pools hairsplitting Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, The current apr_pools.c file is a serious case of "spaghetti" code (ifdefs, debug and non-debug mixed, etc), making it hard to read f not impossible (subtle changes, catastrophic impact). In order to increase the overall readability and foster future improvements, I've separated the apr_pools.c file into more sane and self contained files: apr-pools-allocator.patch # allocator.c apr_allocator apr-pools-print.patch # print.c apr_psprintf and family apr-pools-cleanup.patch # cleanup.c pool cleanup functions apr-pools-properties.patch # propertiees.c set/get methods apr-pools-debug.patch # pools_debug.c pool debug code apr-pools-consolidate.patch # pools.c pool non-debug code Patchset available at http://people.apache.org/~davi/pools/ Before: text data bss dec hex filename 164467 3664 232 168363 291ab libapr-1.so.0.3.0 apr_pools.c 2333 lines libapr-1.so.0.3.0 173K After: text data bss dec hex filename 162033 3680 232 165945 28839 libapr-1.so.0.3.0 pools.c 434 lines libapr-1.so.0.3.0 169K Comments? -- Davi Arnaut