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

Re: [Minios-devel] [PATCH 1/2] lib/ukalloc: Correct uk_pfree() interface behaviour



On 02/08/2018 04:42 PM, Simon Kuenzer wrote:
As designed, every allocator interface calls a *_do_*()
variant which actually implements the operation (e.g.,
malloc, free). uk_pfree() was calling the allocator
directly and skipped an assertion check. This patch
fixes this behavior by calling uk_do_pfree() instead.

Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>

Reviewed-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>

---
  lib/ukalloc/include/uk/alloc.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ukalloc/include/uk/alloc.h b/lib/ukalloc/include/uk/alloc.h
index 1802755..3f0d9e5 100644
--- a/lib/ukalloc/include/uk/alloc.h
+++ b/lib/ukalloc/include/uk/alloc.h
@@ -210,7 +210,7 @@ static inline void uk_do_pfree(struct uk_alloc *a, void 
*ptr, size_t order)
  }
  static inline void uk_pfree(struct uk_alloc *a, void *ptr, size_t order)
  {
-       a->pfree(a, ptr, order);
+       uk_do_pfree(a, ptr, order);
  }
  #endif
  static inline int uk_alloc_addmem(struct uk_alloc *a, void *base,


--
Dr. Florian Schmidt
フローリアン・シュミット
Research Scientist,
Systems and Machine Learning Group
NEC Laboratories Europe
Kurfürsten-Anlage 36, D-69115 Heidelberg
Tel.     +49 (0)6221 4342-265
Fax:     +49 (0)6221 4342-155
e-mail:  florian.schmidt@xxxxxxxxx
============================================================
Registered at Amtsgericht Mannheim, Germany, HRB728558

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