Use of shared memory in PHP
PHP has two sets of functions that use shared memory, one of which is the encapsulation of the system V IPC function, and the other is SHMOP. Neither of these requires the installation of external library files. The
PHP has two sets of functions that use shared memory, one of which is the encapsulation of the system V IPC function, and the other is SHMOP. Neither of these requires the installation of external library files. The former can only be used under
Shared memory is an efficient way to exchange data between applications in the same machine. A process can create a segment of memory that can be accessed by another process as long as it has the correct permissions assigned to it. Each memory
To enable the PHP process to read and write shared memory, developers must first support the IPC function, which is specified when PHP compiles the installation:--enable-shmop and--enable-sysvsem two options .
IPC (inter-process communication) is a
For developers to enable the PHP process to read and write shared memory, the first step is to support the IPC function, which is
PHP Compilation installation specified:--enable-shmop and--enable-sysvsem two options。
The IPC (inter-process
How to use PHP shmop to create and manipulate shared memory segments, using them to store data that can be used by other applications.1. Create a memory segmentA shared memory function is similar to a file manipulation function, but there is no need
SIMPLESHM is a small abstraction layer that uses PHP to manipulate shared memory, enabling easy manipulation of memory segments in an object-oriented manner. When writing small applications that use shared memory for storage, this library helps to
Http://www.cnblogs.com/fengwei/archive/2012/09/12/2682646.htmlPHP, as a scripting program, usually has a short life cycle, such as in a Web application, where a request is a cycle of PHP running, and the end of the request is the life cycle cutoff.
This time for everyone to bring the use of PHP shared memory and signal control using a detailed, PHP shared memory usage and signal control of the use of considerations, the following is the actual case, to look at.
Shared memory
Shared memory is
PHP shared memory usage instance analysis, php shared instance analysis
This example describes the usage of PHP shared memory. We will share this with you for your reference. The details are as follows:
The shared memory is mainly used for
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.