summaryrefslogtreecommitdiff
path: root/src/malloc/memalign.c
blob: 61f456e48667e6a717802eadc5a471d46a8121a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdlib.h>
#include <errno.h>

void *memalign(size_t align, size_t len)
{
	void *mem;
	int ret;
	if ((ret = posix_memalign(&mem, align, len))) {
		errno = ret;
		return 0;
	}
	return mem;
}