[rtems-libbsd commit] ZONE(9): Make sure the chunks are properly aligned

Sebastian Huber sebh at rtems.org
Thu Jan 30 15:35:16 UTC 2014


Module:    rtems-libbsd
Branch:    master
Commit:    821ae675761bea17f34e3cced184093377c9a939
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=821ae675761bea17f34e3cced184093377c9a939

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Jan 30 15:59:15 2014 +0100

ZONE(9): Make sure the chunks are properly aligned

---

 rtemsbsd/rtems/rtems-bsd-chunk.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/rtemsbsd/rtems/rtems-bsd-chunk.c b/rtemsbsd/rtems/rtems-bsd-chunk.c
index f00ae3c..5c9c6eb 100644
--- a/rtemsbsd/rtems/rtems-bsd-chunk.c
+++ b/rtemsbsd/rtems/rtems-bsd-chunk.c
@@ -40,6 +40,7 @@
 #include <machine/rtems-bsd-kernel-space.h>
 #include <machine/rtems-bsd-chunk.h>
 
+#include <rtems/bsd/sys/param.h>
 #include <sys/malloc.h>
 
 #include <rtems/score/apimutex.h>
@@ -65,6 +66,8 @@ void
 rtems_bsd_chunk_init(rtems_bsd_chunk_control *self, uintptr_t info_size,
     rtems_bsd_chunk_info_ctor info_ctor, rtems_bsd_chunk_info_dtor info_dtor)
 {
+	info_size = roundup(info_size, CPU_HEAP_ALIGNMENT);
+
 	self->info_size = info_size;
 	self->info_ctor = info_ctor;
 	self->info_dtor = info_dtor;




More information about the vc mailing list