1 /* 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 12 #ifndef VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_ 13 #define VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_ 14 #include "./vpx_config.h" 15 16 #define ADDRESS_STORAGE_SIZE sizeof(size_t) 17 18 #ifndef DEFAULT_ALIGNMENT 19 # if defined(VXWORKS) 20 # define DEFAULT_ALIGNMENT 32 /*default addr alignment to use in 21 calls to vpx_* functions other 22 than vpx_memalign*/ 23 # else 24 # define DEFAULT_ALIGNMENT (2 * sizeof(void*)) /* NOLINT */ 25 # endif 26 #endif 27 28 /*returns an addr aligned to the byte boundary specified by align*/ 29 #define align_addr(addr,align) (void*)(((size_t)(addr) + ((align) - 1)) & (size_t)-(align)) 30 31 #endif // VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_ 32