From: Dan Magenheimer Subject: RE: [RFC][PATCH] add tlsf option for xmalloc Date: Wed, 15 Oct 2008 12:59:32 -0700 (PDT) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , "Xen-Devel (E-mail)" Cc: Nitin Gupta List-Id: xen-devel@lists.xenproject.org > > Note that this is compile-tested but not run tested yet. I > > thought I'd get feedback on the approach before I get much > > further. >=20 > The approach is fine as far as I'm concerned. It should just=20 > replace the > existing xmalloc.c of course: no point in keeping the old one around. > Therefore may as well put the whole implementation in=20 > xmalloc.c, or call it > xmalloc_tlsf.c if you're really keen to keep the name of the=20 > algorithm in > the file name (in which case xmalloc.c should be entirely deleted; or > perhaps temporarily make it a build option which .c file gets built if > really worried that the new xmalloc implementation may have=20 > subtle bugs and > we'd like to be able to revert for testing). >=20 > Structure definitions and the like which are private to TLSF=20 > should live at > the top of the .c file: I prefer that to the =20 > approach as it > keeps private non-shared stuff all in one place. Sounds good. You may note that the tlsf files borrowed from Nitin Gupta use Linux-style indentation/formatting. One of my reasons for not merging the tlsf allocation with xmalloc is I was too lazy to reformat ;-) Do I need to do that or can I leave it as is or do you have a tool that will auto-reformat it to meet the Xen style requirements? Thanks, Dan P.S. Posted patch boots fine.