From: Keir Fraser Subject: Re: Xmalloc worst case performance and bad corner cases Date: Sat, 27 Sep 2008 04:15:19 +0100 Message-ID: References: <18fe9415-24d1-4a7c-81f8-a34f3ec3fccb@default> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <18fe9415-24d1-4a7c-81f8-a34f3ec3fccb@default> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dan Magenheimer , "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org Yes, it's not a very good allocator! -- Keir On 26/9/08 23:34, "Dan Magenheimer" wrote: > It appears that if xmalloc (Xen heap allocator) is > used for a long sequence of n memory requests with > the size of each request greater than a half-page, > but less than a page, performance will be O(n**2). > > True? > > And because of space for a header and alignment, > the interval is actually from slightly less than > a half-page to slightly less than a full-page... > and xmalloc of a few bytes less than a full-page will > actually end up allocating two full pages! > > True? > > (Yes, I realize that xmalloc'ing a "long sequence" > from Xen heap is not a good idea because the Xen > heap is rather small, but I currently have a veneer > using the xmalloc/xfree routines on top of the > domain heap, and "future versions" of 64-bit combined > heap allocation may reuse the existing allocation > algorithm.) > > Dan > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel