php-internal-docs
8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
zend_mmap.h
Go to the documentation of this file.
1
/*
2
+----------------------------------------------------------------------+
3
| This source file is subject to version 2.00 of the Zend license, |
4
| that is bundled with this package in the file LICENSE, and is |
5
| available through the world-wide-web at the following url: |
6
| http://www.zend.com/license/2_00.txt. |
7
| If you did not receive a copy of the Zend license and are unable to |
8
| obtain it through the world-wide-web, please send a note to |
9
| license@zend.com so we can mail you a copy immediately. |
10
+----------------------------------------------------------------------+
11
| Authors: Max Kellermann <max.kellermann@ionos.com> |
12
+----------------------------------------------------------------------+
13
*/
14
15
#ifndef ZEND_MMAP_H
16
#define ZEND_MMAP_H
17
18
#include "
zend_portability.h
"
19
20
#ifdef HAVE_PRCTL
21
# include <sys/prctl.h>
22
23
/* fallback definitions if our libc is older than the kernel */
24
# ifndef PR_SET_VMA
25
# define PR_SET_VMA 0x53564d41
26
# endif
27
# ifndef PR_SET_VMA_ANON_NAME
28
# define PR_SET_VMA_ANON_NAME 0
29
# endif
30
#endif
// HAVE_PRCTL
31
37
static
zend_always_inline
void
zend_mmap_set_name(
const
void
*
start
,
size_t
len
,
const
char
*
name
)
38
{
39
#ifdef HAVE_PRCTL
40
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, (
unsigned
long
)
start
,
len
, (
unsigned
long
)
name
);
41
#endif
42
}
43
44
#endif
/* ZEND_MMAP_H */
len
size_t len
Definition
apprentice.c:174
start
buf start
Definition
ffi.c:4687
zend_portability.h
zend_always_inline
#define zend_always_inline
Definition
zend_portability.h:375
name
zend_string * name
Definition
zend_vm_def.h:2429
Zend
zend_mmap.h
Generated on Sat Aug 23 2025 01:46:14 for php-internal-docs by
1.13.2