vpx_mem: increase default alignment
authorJames Zern <jzern@google.com>
Sat, 7 Sep 2013 01:20:10 +0000 (18:20 -0700)
committerJames Zern <jzern@google.com>
Sat, 7 Sep 2013 02:11:51 +0000 (19:11 -0700)
this prevents returning an address smaller than the natural heap
alignment from vpx_malloc on e.g., x86_64

Change-Id: I283e858664a8529f28b22060c3815116a7798c0d

vpx_mem/include/vpx_mem_intrnl.h

index 60b5165..2248ad5 100644 (file)
@@ -50,14 +50,10 @@ vpx_memcpy, _memset, and _memmove*/
 calls to vpx_* functions other
 than vpx_memalign*/
 # else
-#  define DEFAULT_ALIGNMENT        1
+#  define DEFAULT_ALIGNMENT        (2 * sizeof(void*))  /* NOLINT */
 # endif
 #endif
 
-#if DEFAULT_ALIGNMENT < 1
-# error "DEFAULT_ALIGNMENT must be >= 1!"
-#endif
-
 #if CONFIG_MEM_TRACKER
 # define TRY_BOUNDS_CHECK         1        /*when set to 1 pads each allocation,
 integrity can be checked using