]> granicus.if.org Git - php/commitdiff
Use VM_MAKE_TAG for macos memory tag
authorDavid CARLIER <devnexen@gmail.com>
Sat, 13 Feb 2021 07:58:48 +0000 (07:58 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 15 Feb 2021 08:48:04 +0000 (09:48 +0100)
In case Apple changes the meaning of the macro in the future.

Closes GH-6687.

Zend/zend_alloc.c

index 97f77827d8919e322621dd8c851fe6767e02d385..10e739c0ee9958305f2d63bf01ad70c8b0cf2a85 100644 (file)
@@ -114,10 +114,11 @@ static size_t _real_page_size = ZEND_MM_PAGE_SIZE;
 #ifndef __APPLE__
 # define ZEND_MM_FD -1
 #else
+# include <mach/vm_statistics.h>
 /* Mac allows to track anonymous page via vmmap per TAG id.
  * user land applications are allowed to take from 240 to 255.
  */
-# define ZEND_MM_FD (250u << 24u)
+# define ZEND_MM_FD VM_MAKE_TAG(250U)
 #endif
 
 #ifndef ZEND_MM_STAT