diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-08-31 13:56:42 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-08-31 13:56:42 +0300 |
commit | 89aa1b73929d3a02d4e0bae6edf76e6b325ce8f9 (patch) | |
tree | c24d82df8672666e65c9ea41153d1016f3e61269 /Zend/zend_alloc.h | |
parent | 37f0c6b5cb4f8ad01651b3ea80712f6a8b6f2ea0 (diff) | |
download | php-git-89aa1b73929d3a02d4e0bae6edf76e6b325ce8f9.tar.gz |
Ensure proper data alignment
Diffstat (limited to 'Zend/zend_alloc.h')
-rw-r--r-- | Zend/zend_alloc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h index 787597366a..cd4bb62e1d 100644 --- a/Zend/zend_alloc.h +++ b/Zend/zend_alloc.h @@ -42,6 +42,9 @@ #define ZEND_MM_ALIGNED_SIZE(size) (((size) + ZEND_MM_ALIGNMENT - Z_L(1)) & ZEND_MM_ALIGNMENT_MASK) +#define ZEND_MM_ALIGNED_SIZE_EX(size, alignment) \ + (((size) + ((alignment) - Z_L(1))) & ~((alignment) - Z_L(1))) + typedef struct _zend_leak_info { void *addr; size_t size; |