Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWan-Teh Chang <wtc@google.com>2020-04-03 01:38:56 +0300
committerWan-Teh Chang <wtc@google.com>2020-04-03 01:38:56 +0300
commitab350c2f29c6b38c68bb365c9919fa709490f57d (patch)
tree3d8d1714f94419a8d9986346ca666858f5bfb1a6 /include
parent23517a3e4d2aaebcd45f2afd50ad0f6df36c040c (diff)
Update a stale comment for dav1d_alloc_aligned()
Also, the assertion that 'align' is a power of 2 can be used by all cases in dav1d_alloc_aligned().
Diffstat (limited to 'include')
-rw-r--r--include/common/mem.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/common/mem.h b/include/common/mem.h
index a633b2a..74cdaf2 100644
--- a/include/common/mem.h
+++ b/include/common/mem.h
@@ -37,13 +37,13 @@
#include "common/attributes.h"
/*
- * Allocate 32-byte aligned memory. The return value can be released
- * by calling the standard free() function.
+ * Allocate align-byte aligned memory. The return value can be released
+ * by calling the dav1d_free_aligned() function.
*/
static inline void *dav1d_alloc_aligned(size_t sz, size_t align) {
+ assert(!(align & (align - 1)));
#ifdef HAVE_POSIX_MEMALIGN
void *ptr;
- assert(!(align & (align - 1)));
if (posix_memalign(&ptr, align, sz)) return NULL;
return ptr;
#elif defined(HAVE_ALIGNED_MALLOC)