| To: | Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [Xen-devel] [RFC] Replacing Xen's xmalloc engine and(?) API |
| From: | Keir Fraser <keir.fraser@xxxxxxxxxxxxx> |
| Date: | 2008年10月12日 11:25:34 +0100 |
| Cc: | Diwaker Gupta <dgupta@xxxxxxxxxxx>, nitingupta910@xxxxxxxxx, kurt.hackel@xxxxxxxxxx |
| Delivery-date: | 2008年10月12日 03:25:46 -0700 |
| Envelope-to: | www-data@xxxxxxxxxxxxxxxxxxx |
| In-reply-to: | <C5177EFB.1E12A%keir.fraser@xxxxxxxxxxxxx> |
| List-help: | <mailto:xen-devel-request@lists.xensource.com?subject=help> |
| List-id: | Xen developer discussion <xen-devel.lists.xensource.com> |
| List-post: | <mailto:xen-devel@lists.xensource.com> |
| List-subscribe: | <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
| List-unsubscribe: | <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
| Sender: | xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
| Thread-index: | AcksSzRlcxoCBpg+Ed22twAWy6hiGQACafMA |
| Thread-topic: | [Xen-devel] [RFC] Replacing Xen's xmalloc engine and(?) API |
| User-agent: | Microsoft-Entourage/11.4.0.080122 |
On 12/10/08 10:16, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx> wrote: > On 11/10/08 22:44, "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx> wrote: > >> As a result, I'd like to propose a change to the xmalloc interface >> to make this issue more explicit: I'd like to change xmalloc/xfree >> to FAIL on allocation sizes greater than PAGE_SIZE - DELTA, where >> DELTA is a defined constant. Callers that require an allocation >> larger than that MUST use the page_alloc (and corresponding >> page_free) interfaces. In other words, for any dynamic allocation >> code that needs a dynamically computed size that might exceed a >> page, the test must be done on the caller-side... and the caller >> is responsible for remembering whether the subpage allocator or >> the page-plus allocator was used, and free'ing with the matching >> subpage-free or page-plus-free routine. While I'd never propose >> this unforgiving API for user-land code, I think it isn't unreasonable >> in a hypervisor. > > This sounds crazy to me. xmalloc() should work like malloc(). For example, why not take Linux's SLUB allocator? The fact it's tried and tested in a real-world environment not unlike our own is a big advantage to my mind. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [Xen-devel] size_t and printk and Xen , Keir Fraser |
|---|---|
| Next by Date: | RE: [Xen-devel] [RFC] Replacing Xen's xmalloc engine and(?) API , Dan Magenheimer |
| Previous by Thread: | Re: [Xen-devel] [RFC] Replacing Xen's xmalloc engine and(?) API , Keir Fraser |
| Next by Thread: | RE: [Xen-devel] [RFC] Replacing Xen's xmalloc engine and(?) API , Dan Magenheimer |
| Indexes: | [Date] [Thread] [Top] [All Lists] |