2010-05-18 17:58:33 +02:00
|
|
|
/*
|
2010-09-09 14:16:39 +02:00
|
|
|
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
2010-05-18 17:58:33 +02:00
|
|
|
*
|
2010-06-18 18:39:21 +02:00
|
|
|
* Use of this source code is governed by a BSD-style license
|
2010-06-04 22:19:40 +02: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 18:39:21 +02:00
|
|
|
* in the file PATENTS. All contributing project authors may
|
2010-06-04 22:19:40 +02:00
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
2010-05-18 17:58:33 +02:00
|
|
|
*/
|
|
|
|
|
2013-12-16 03:32:02 +01:00
|
|
|
#ifndef VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_
|
|
|
|
#define VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_
|
2012-12-23 16:20:10 +01:00
|
|
|
#include "./vpx_config.h"
|
2010-05-18 17:58:33 +02:00
|
|
|
|
2016-07-25 23:16:28 +02:00
|
|
|
#define ADDRESS_STORAGE_SIZE sizeof(size_t)
|
2010-05-18 17:58:33 +02:00
|
|
|
|
|
|
|
#ifndef DEFAULT_ALIGNMENT
|
2016-07-25 23:16:28 +02: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 17:58:33 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*returns an addr aligned to the byte boundary specified by align*/
|
2016-07-25 23:16:28 +02:00
|
|
|
#define align_addr(addr, align) \
|
2016-08-27 19:34:40 +02:00
|
|
|
(void *)(((size_t)(addr) + ((align)-1)) & ~(size_t)((align)-1))
|
2010-05-18 17:58:33 +02:00
|
|
|
|
2013-12-16 03:32:02 +01:00
|
|
|
#endif // VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_
|