2010-05-18 11:58:33 -04:00
|
|
|
/*
|
2010-09-09 08:16:39 -04:00
|
|
|
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
2010-05-18 11:58:33 -04:00
|
|
|
*
|
2010-06-18 12:39:21 -04:00
|
|
|
* Use of this source code is governed by a BSD-style license
|
2010-06-04 16:19:40 -04:00
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
2010-06-18 12:39:21 -04:00
|
|
|
* in the file PATENTS. All contributing project authors may
|
2010-06-04 16:19:40 -04:00
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
2010-05-18 11:58:33 -04:00
|
|
|
*/
|
|
|
|
|
2013-12-15 18:32:02 -08:00
|
|
|
#ifndef VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_
|
|
|
|
#define VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_
|
2012-12-23 07:20:10 -08:00
|
|
|
#include "./vpx_config.h"
|
2010-05-18 11:58:33 -04:00
|
|
|
|
2016-07-25 14:16:28 -07:00
|
|
|
#define ADDRESS_STORAGE_SIZE sizeof(size_t)
|
2010-05-18 11:58:33 -04:00
|
|
|
|
|
|
|
#ifndef DEFAULT_ALIGNMENT
|
2016-07-25 14:16:28 -07:00
|
|
|
#if defined(VXWORKS)
|
|
|
|
/*default addr alignment to use in calls to vpx_* functions other than
|
|
|
|
* vpx_memalign*/
|
|
|
|
#define DEFAULT_ALIGNMENT 32
|
|
|
|
#else
|
|
|
|
#define DEFAULT_ALIGNMENT (2 * sizeof(void *)) /* NOLINT */
|
|
|
|
#endif
|
2010-05-18 11:58:33 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*returns an addr aligned to the byte boundary specified by align*/
|
2016-07-25 14:16:28 -07:00
|
|
|
#define align_addr(addr, align) \
|
2016-08-27 10:34:40 -07:00
|
|
|
(void *)(((size_t)(addr) + ((align)-1)) & ~(size_t)((align)-1))
|
2010-05-18 11:58:33 -04:00
|
|
|
|
2013-12-15 18:32:02 -08:00
|
|
|
#endif // VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_
|