We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ca21d2 commit 2c08c57Copy full SHA for 2c08c57
Zend/zend.c
@@ -42,6 +42,10 @@
42
#include "php.h"
43
#include "php_globals.h"
44
45
+#if defined(__APPLE__)
46
+#include <mach/machine/vm_param.h>
47
+#endif
48
+
49
// FIXME: Breaks the declaration of the function below
50
#undef zenderror
51
@@ -1275,6 +1279,10 @@ ZEND_API size_t zend_get_page_size(void)
1275
1279
SYSTEM_INFO system_info;
1276
1280
GetSystemInfo(&system_info);
1277
1281
return system_info.dwPageSize;
1282
+#elif defined(__APPLE__)
1283
+ /* Is in fact the global vm_page_size which is a kernel global
1284
+ * we save a syscall as they fetch the same cached value */
1285
+ return (size_t)PAGE_SIZE;
1278
1286
#elif defined(__FreeBSD__)
1287
/* This returns the value obtained from
1288
* the auxv vector, avoiding a syscall. */
0 commit comments