projects
/
dragonfly.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Merge branch 'vendor/LIBARCHIVE'
[dragonfly.git]
/
lib
/
libc
/
stdlib
/
aligned_alloc.c
1
#include <sys/types.h>
2
#include <stdlib.h>
3
#include <errno.h>
4
5
void *
6
aligned_alloc(size_t alignment, size_t size)
7
{
8
void *ptr;
9
int rc;
10
11
ptr = NULL;
12
rc = posix_memalign(&ptr, alignment, size);
13
if (rc)
14
errno = rc;
15
16
return (ptr);
17
}