Table des matières

PHP and Shared Memory

Implementations

shmop_*

shmop is to provide a symple interface to shared memory that can be used with OTHER NON php shm creators.

Versions of Windows previous to Windows 2000 do not support shared memory.

Remember, that shared memory is NOT safe against simultaneous access.

shm_*

shm

This extension is not available on Windows platforms.

Remember, that shared memory is NOT safe against simultaneous access. Use semaphores for synchronization.

PHP compilation options :

Runtime option:

Essais

Essais01

Création d'une block de mémoire partagée et remplissage avec plusieurs variables. Lecture de ce block et ces variables. Destruction du bloque de mémoire partagée.

code source Essais01

Essais02

Quelle est la limite de mémoire partagée.

Chez OVH c'est < 32Mo.

code source Essais02