Skip to content

Commit 2b93ae6

Browse files
devnexennikic
authored andcommitted
Use VM_MAKE_TAG for macos memory tag
In case Apple changes the meaning of the macro in the future. Closes GH-6687.
1 parent b117712 commit 2b93ae6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Zend/zend_alloc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,11 @@ static size_t _real_page_size = ZEND_MM_PAGE_SIZE;
114114
#ifndef __APPLE__
115115
# define ZEND_MM_FD -1
116116
#else
117+
# include <mach/vm_statistics.h>
117118
/* Mac allows to track anonymous page via vmmap per TAG id.
118119
* user land applications are allowed to take from 240 to 255.
119120
*/
120-
# define ZEND_MM_FD (250u << 24u)
121+
# define ZEND_MM_FD VM_MAKE_TAG(250U)
121122
#endif
122123

123124
#ifndef ZEND_MM_STAT

0 commit comments

Comments
 (0)