Home | History | Annotate | Download | only in include
      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 #ifndef VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_
     12 #define VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_
     13 #include "./vpx_config.h"
     14 
     15 #define ADDRESS_STORAGE_SIZE sizeof(size_t)
     16 
     17 #ifndef DEFAULT_ALIGNMENT
     18 #if defined(VXWORKS)
     19 /*default addr alignment to use in calls to vpx_* functions other than
     20  * vpx_memalign*/
     21 #define DEFAULT_ALIGNMENT 32
     22 #else
     23 #define DEFAULT_ALIGNMENT (2 * sizeof(void *)) /* NOLINT */
     24 #endif
     25 #endif
     26 
     27 /*returns an addr aligned to the byte boundary specified by align*/
     28 #define align_addr(addr, align) \
     29   (void *)(((size_t)(addr) + ((align)-1)) & ~(size_t)((align)-1))
     30 
     31 #endif  // VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_
     32