[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Minios-devel] [UNIKRAFT PATCH v2 1/6] lib/ukalloc: Add functions for allocating/deallocating a single page
- To: minios-devel@xxxxxxxxxxxxx
- From: Costin Lupu <costin.lupu@xxxxxxxxx>
- Date: Thu, 28 Jun 2018 15:38:30 +0300
- Cc: simon.kuenzer@xxxxxxxxx, sharan.santhanam@xxxxxxxxx, yuri.volchkov@xxxxxxxxx
- Delivery-date: Thu, 28 Jun 2018 12:38:45 +0000
- Ironport-phdr: 9a23:Awa/jBUV3slhQNTTNr/SPJn00efV8LGtZVwlr6E/grcLSJyIuqrYbReBt8tkgFKBZ4jH8fUM07OQ7/i+HzRYqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba9zIRmssQndqtQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXMTRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5KptVRTmijoINyQh/W/XlMJ+kaxVrhGmqRN9zY7Ze52ZOOZkc6/BZ94WWXZNU8BMXCJBGIO8aI4PAvIfMOZftIn9u1oOrR2jDgeqGePv0iJIjWLx0KIm1OQhCh3G3A0mH94UtHTUsc31NLoJXO+p16nE1y3Db+5N1jvn8ojIdQksrPeRVrxzacrc0VQjGgzYglmKqoHoPymZ2voTv2WZ9eZtW/qjh3Mopg1suDSixcchhpPXio8bxF3I7zh1zYkrKdC+VUV1e8SrEIFKuCGfL4Z2R8QiTHx2tysi0b0GvIK7fDANyJQ62x7Tc/yHfJaM4hLkTOuRPzJ4i2hkeLK7nRq97VOgxvfkVsmpy1lGtDBFkt7UunAM0Rzc9NSHR+Ng8kquxDqDzQPe5+FeLUwqi6bWKYQtz7AompoWq0vDHyv2mEvsjK+Rc0Up4vSn6+P8YrX6p5+cMZV4igXjMqQ2h8yyGvg3MhMUU2iD5OSzz6fv/Vf+QLlSlP05jrHZsIzGJcQcvqO5Bg5V0oAi6xa4FDeqyckXkmcZLF1bfBKKlIzpO1DVIPDkFvezmVutnyltx/zcOb3hGJrNJGDZkLj9ZbZ991JcyA0rwNBE55JbEKsBL+j1WkPrr9zXFBk5MxC0w+n9DtVyzIYeVHmJAqCHLKzStUWH6fk1L+aSeY8foCz9JOQ95/7ykX85nkcQfbKo3ZsSb3C4GO5qI0aEYXXyhNcAEHkFvhAlQezsllKNTTpTaGypUK4m+D47FZqsDZ3fSYC1nLyBwCC7E4VWZ2BbEFCMEG3kd5uDW/cIdC2SIsxhkjsaVbW6TY8uyw2htAvgxLV8NObb5DAY5trf041w5uvSkgp3+TFqAsC112CWU3oyjm4OATgs0/NRu0t4n3yEyrR5hbR8CMROr6dCVRwmNJiay/FiFvj5QUTZY93PUlHwEYbuOi04Ut9km4xGWE16Adj31h0=
- 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
|