From http://www.jwz.org/xscreensaver/xscreensaver-5.37.tar.gz
[xscreensaver] / utils / aligned_malloc.h
1 /* -*- mode: c; tab-width: 4; fill-column: 128 -*- */
2 /* vi: set ts=4 tw=128: */
3
4 /*
5 aligned_malloc.h, Copyright (c) 2014 Dave Odell <dmo2118@gmail.com>
6
7 Permission to use, copy, modify, distribute, and sell this software and its
8 documentation for any purpose is hereby granted without fee, provided that
9 the above copyright notice appear in all copies and that both that
10 copyright notice and this permission notice appear in supporting
11 documentation.  No representations are made about the suitability of this
12 software for any purpose.  It is provided "as is" without express or
13 implied warranty.
14 */
15
16 #ifndef __ALIGNED_MALLOC_H__
17 #define __ALIGNED_MALLOC_H__
18
19 #include <stdlib.h>
20
21  /* This can't simply be named posix_memalign, since the real thing uses
22     free(), but this one can't. */
23  int aligned_malloc(void **ptr, unsigned alignment, size_t size);
24  void aligned_free(void *);
25
26 #endif /* __ALIGNED_MALLOC_H__ */