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

Re: [Minios-devel] [UNIKRAFT PATCH v2 1/6] lib/ukalloc: Add functions for allocating/deallocating a single page



Reviewed-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>

Costin Lupu <costin.lupu@xxxxxxxxx> writes:

> Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
> ---
>  lib/ukalloc/include/uk/alloc.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/lib/ukalloc/include/uk/alloc.h b/lib/ukalloc/include/uk/alloc.h
> index d59da30..8974248 100644
> --- a/lib/ukalloc/include/uk/alloc.h
> +++ b/lib/ukalloc/include/uk/alloc.h
> @@ -203,6 +203,10 @@ static inline void *uk_palloc(struct uk_alloc *a, size_t 
> order)
>               return NULL;
>       return a->palloc(a, order);
>  }
> +static inline void *uk_malloc_page(struct uk_alloc *a)
> +{
> +     return uk_palloc(a, 0);
> +}
>  static inline void uk_do_pfree(struct uk_alloc *a, void *ptr, size_t order)
>  {
>       UK_ASSERT(a);
> @@ -212,6 +216,10 @@ static inline void uk_pfree(struct uk_alloc *a, void 
> *ptr, size_t order)
>  {
>       uk_do_pfree(a, ptr, order);
>  }
> +static inline void uk_free_page(struct uk_alloc *a, void *ptr)
> +{
> +     return uk_pfree(a, ptr, 0);
> +}
>  #endif
>  static inline int uk_alloc_addmem(struct uk_alloc *a, void *base,
>                                 size_t size)
> -- 
> 2.11.0
>

-- 
Yuri Volchkov
Software Specialist

NEC Europe Ltd
Kurfürsten-Anlage 36
D-69115 Heidelberg

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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