revert between 56095 -> 55830 in arch
[AROS.git] / arch / i386-pc / kernel / utils.c
blobda05af21156a8ccb1fb4b137c8e6bf0022ceba41
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <proto/exec.h>
8 void *krnAllocMemAligned(unsigned long size, unsigned long align)
10 void *mem;
12 align--;
13 mem = AllocMem(size + align, MEMF_PUBLIC|MEMF_CLEAR);
14 if (!mem)
15 return NULL;
17 return (void *)(((IPTR)mem + align) & (~align));