Skip to content

Commit 7f3ed3f

Browse files
committed
using getpagesize instead
1 parent 2c08c57 commit 7f3ed3f

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Zend/zend.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@
4242
#include "php.h"
4343
#include "php_globals.h"
4444

45-
#if defined(__APPLE__)
46-
#include <mach/machine/vm_param.h>
47-
#endif
48-
4945
// FIXME: Breaks the declaration of the function below
5046
#undef zenderror
5147

@@ -1279,11 +1275,7 @@ ZEND_API size_t zend_get_page_size(void)
12791275
SYSTEM_INFO system_info;
12801276
GetSystemInfo(&system_info);
12811277
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;
1286-
#elif defined(__FreeBSD__)
1278+
#elif defined(__FreeBSD__) || defined(__APPLE__)
12871279
/* This returns the value obtained from
12881280
* the auxv vector, avoiding a syscall. */
12891281
return getpagesize();

0 commit comments

Comments
 (0)