aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/include/xmalloc.h
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-01-22 09:45:54 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-01-22 09:45:54 +0000
commitd6398adb031febaf26f5bd5d20f544740e8d9abd (patch)
tree72738e45d018cd5fbeffbf3fc168f5e2ef75ab53 /extras/mini-os/include/xmalloc.h
parentb7d7bde93532745ac21f2a09b7f926533f104861 (diff)
downloadxen-d6398adb031febaf26f5bd5d20f544740e8d9abd.tar.gz
xen-d6398adb031febaf26f5bd5d20f544740e8d9abd.tar.bz2
xen-d6398adb031febaf26f5bd5d20f544740e8d9abd.zip
minios: Add align support to _xmalloc().
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/include/xmalloc.h')
-rw-r--r--extras/mini-os/include/xmalloc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/extras/mini-os/include/xmalloc.h b/extras/mini-os/include/xmalloc.h
index e8052ac68d..26ae9dd012 100644
--- a/extras/mini-os/include/xmalloc.h
+++ b/extras/mini-os/include/xmalloc.h
@@ -7,7 +7,8 @@
/* Allocate space for array of typed objects. */
#define xmalloc_array(_type, _num) ((_type *)_xmalloc_array(sizeof(_type), __alignof__(_type), _num))
-#define malloc(size) _xmalloc(size, 4)
+#define DEFAULT_ALIGN (sizeof(unsigned long))
+#define malloc(size) _xmalloc(size, DEFAULT_ALIGN)
#define free(ptr) xfree(ptr)
#define realloc(ptr, size) _realloc(ptr, size)