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

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


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Fri, 22 Jun 2018 14:16:51 +0300
  • Cc: simon.kuenzer@xxxxxxxxx, sharan.santhanam@xxxxxxxxx, yuri.volchkov@xxxxxxxxx
  • Delivery-date: Fri, 22 Jun 2018 11:17:09 +0000
  • Ironport-phdr: 9a23:so8r6Reh9Tgk/mU8erNmuka3lGMj4u6mDksu8pMizoh2WeGdxcW5Yh7h7PlgxGXEQZ/co6odzbaO7ua4ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTahYb5+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v6bpgRh31hycdLzM38H/ZhNF+gqxYpxyupRJ/zpXIbI2JLvdyYrnQcc8GSWdHQ81fVzZBAoS5b4YXEecBOv1Yr5X8p1sIsBCwAxSsBPvyyjRVgXL5wao60/89EQHH2gwsBdYOsGnMrNXoL6odTfu1wLPQzTXedPxawy396I/Rfx0nvPqCXqpwfNLMxUQgCg/JlFadpIz/Mz+LyOgAsXKX4uR4We6yhGMrtht9rzuvy8s2lIXEiIwYxkrZ+Sh23oo4I8CzRlRhbt6+CpRQsjmXN45xQsw/XW5loD06yrgauZ6jeygK1Ygnywbfa/OZd4iI5QruVPiUIThihXJlfKiziAqp8US60u38S9K73ExQripCitXMt3YN2ALP6sWfV/dw8Vqt1SyM2g3T8O1IP144mKjBJ5Mv2rIwk4AcsUXHHi/4gkX2i6qWe1049eiv8OTnfrTmppmGO49wlwH+Krkul9ejDuQjKAQOR3Wb9v+m2L35+k31WK9KgeEukqnFrJDaItwWpqu4Aw9T04Yj7A2/Ay6739sGg3kIMlZFdQmDj4joIFHOPOv4Ae2wgluyljdn3ffGPqfuAp/VNHjMjK/hfaph605b0Acz1tBf6IhOCr4bJvL/QFTxu8beDh8lMwy72eDnB8941o4FX2KAHLOWMKfIvlCT/O4gPfSMbpcPuDnhM/gl++LujXghlF8GfKmp2JwXaHaiEvRlPkWWf3zsg9YfHmcQpQc+SvLlh0GGUTFJfHm+Rbwz5iwjAoK8EYjDXpytgKCG3CqjHpxWe3pGClGWHXf2cIWEX+sDaCKRIs9mjDwJTr6hRJE92hGqrgD10KBrIfTJ+n5QiZW20dlz5urI0B0/6zFwJ8CcyH2WCXF5mCUPXTBl8rp4pBlWzUyf0K4wp+FACJQH7PRSTgY8c5rB1/FSAMu0Qh/LOM2OHgX1Cu66CC08G4pii+QFZFxwTo2v
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

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


_______________________________________________
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®.