File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,15 +176,15 @@ typedef uint32_t zend_mm_page_info; /* 4-byte integer */
176176typedef zend_ulong zend_mm_bitset ; /* 4-byte or 8-byte integer */
177177
178178#ifdef PHP_HAVE_BUILTIN_ALIGN_DOWN
179- # define ZEND_MM_ALIGNED_OFFSET (size , alignment ) \
180- (((size_t)(size)) - (size_t)__builtin_align_down((size), (alignment)))
181179# define ZEND_MM_ALIGNED_BASE (ptr , alignment ) \
182180 __builtin_align_down((ptr), (alignment))
181+ # define ZEND_MM_ALIGNED_OFFSET (ptr , alignment ) \
182+ (((size_t)(ptr)) - (size_t)ZEND_MM_ALIGNED_BASE(ptr, alignment))
183183#else
184- # define ZEND_MM_ALIGNED_OFFSET (size , alignment ) \
185- (((size_t)(size)) & ((alignment) - 1))
186184# define ZEND_MM_ALIGNED_BASE (ptr , alignment ) \
187185 (((uintptr_t)(ptr)) & ~((alignment) - 1))
186+ # define ZEND_MM_ALIGNED_OFFSET (ptr , alignment ) \
187+ (((size_t)(ptr)) & ((alignment) - 1))
188188#endif
189189
190190#ifdef PHP_HAVE_BUILTIN_ALIGN_UP
You can’t perform that action at this time.
0 commit comments