[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v5 04/28] vmap: Add vmalloc_cb and vfree_cb



>>> On 24.03.16 at 21:00, <konrad.wilk@xxxxxxxxxx> wrote:
> @@ -266,16 +275,15 @@ void *vzalloc(size_t size)
>      return p;
>  }
>  
> -void vfree(void *va)
> +void vfree_cb(void *va, unsigned int pages, vfree_cb_t *vfree_cb_fnc)

Just to repeat: This "caller provides size" worries me, the more that
this doesn't mirror anything the allocation side does. Would you mind
providing a case where using vm_size() instead is not correct?

> --- a/xen/include/xen/vmap.h
> +++ b/xen/include/xen/vmap.h
> @@ -12,9 +12,23 @@ void *__vmap(const mfn_t *mfn, unsigned int granularity,
>  void *vmap(const mfn_t *mfn, unsigned int nr);
>  void vunmap(const void *);
>  void *vmalloc(size_t size);
> +
> +/*
> + * Callback for vmalloc_cb to use when vmap-ing.
> + */

Comment style.

> +typedef void *(vmap_cb_t)(const mfn_t *mfn, unsigned int pages);

Stray parentheses (again).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.