cvs: phpdoc /fr/functions shmop.xml
| From: | Damien Seguy | Date: | Mon, 06 Nov 2000 14:08:24 +0000 |
| Subject: | cvs: phpdoc /fr/functions shmop.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969332804@lists.php.net to get a copy of this message | ||
dams Mon Nov 6 06:08:24 2000 EDT
Modified files:
/phpdoc/fr/functions shmop.xml
Log:
Translation.
Index: phpdoc/fr/functions/shmop.xml diff -u phpdoc/fr/functions/shmop.xml:1.3 phpdoc/fr/functions/shmop.xml:1.4 --- phpdoc/fr/functions/shmop.xml:1.3 Fri Oct 20 15:45:11 2000 +++ phpdoc/fr/functions/shmop.xml Mon Nov 6 06:08:24 2000 @@ -1,57 +1,52 @@ <reference id="ref.shmop"> - <title>Shared Memory Functions</title> + <title>Mémoire partagée</title> <titleabbrev>shmop</titleabbrev> <partintro> <para> - Shmop is an easy to use set of functions that allows php to read, - write, create and delete UNIX shared memory segments. The functions - will not work on windows, as it does not support shared memory. To - use shmop you will need to compile php with the --enable-shmop parameter - in your configure line. + Shmop est un ensemble de fonctions simples pour gérer + la mémoire partagée avec PHP (lecture, + écriture, création et suppressions de segments de + mémoire paragée UNIX). Ces fonctions ne fonctionnent pas + sous Windows, car ce système d'exploitation ne supporte pas + la mémoire partagée. Pour utiliser les fonctions + shmop, compilez PHP avec l'option --enable-shmop parameter. </para> - <note> - <simpara> - The functions explained in the chapter begin all with - <function>shm_</function> in PHP 4.0.3, but in PHP 4.0.4 and later - versions these names are changed to begin with - <function>shmop_</function>. - </simpara> - </note> <para> <example> - <title>Shared Memory Operations Overview</title> + <title>Introduction à la mémoire partagée</title> <programlisting role="php"> <?php -// Create 100 byte shared memory block with system id if 0xff3 -$shm_id = shmop_open(0xff3, "c", 0644, 100); +// Crée 100 octets de mémoire partagée avec +// un identifiant système "0xff3" +$shm_id = shm_open(0xff3, "c", 0644, 100); if(!$shm_id) { - echo "Couldn't create shared memory segment\n"; + echo "Impossible de créer la mémoire partagée\n"; } -// Get shared memory block's size -$shm_size = shmop_size($shm_id); -echo "SHM Block Size: ".$shm_size. " has been created.\n"; +// Lire la taille de la mémoire partagée +$shm_size = shm_size($shm_id); +echo "Un bloc de SHM de taille ".$shm_size. " a été créé.\n"; -// Lets write a test string into shared memory -$shm_bytes_written = shmop_write($shm_id, "my shared memory block", 0); -if($shm_bytes_written != strlen("my shared memory block")) { - echo "Couldn't write the entire length of data\n"; +// Ecriture d'une chaîne de test dans ce segment +$shm_bytes_written = shm_write($shm_id, "mon bloc de mémoire partagée", 0); +if($shm_bytes_written != strlen("mon bloc de mémoire partagée")) { + echo "Impossible d'écrire toutes les données en mémoire\n"; } -// Now lets read the string back -$my_string = shmop_read($shm_id, 0, $shm_size); +// Lecture du segment +$my_string = shm_read($shm_id, 0, $shm_size); if(!$my_string) { - echo "Couldn't read from shared memory block\n"; + echo "Impossible de lire toutes les données en mémoire\n"; } -echo "The data inside shared memory was: ".$my_string."\n"; +echo "Les données mis en mémoire partagées sont : ".$my_string."\n"; -//Now lets delete the block and close the shared memory segment -if(!shmop_delete($shm_id)) { - echo "Couldn't mark shared memory block for deletion. +//Maintenant, effacons le bloc, et fermons le segment de mémoire +if(!shm_delete($shm_id)) { + echo "Impossible d'effacer le segment de mémoire"; } -shmop_close($shm_id); +shm_close($shm_id); ?> </programlisting> @@ -59,16 +54,18 @@ </para> </partintro> - <refentry id="function.shmop_open"> + <refentry id="function.shm-open"> <refnamediv> - <refname>shmop_open</refname> - <refpurpose>Create or open shared memory block</refpurpose> + <refname>shm_open</refname> + <refpurpose> + Crée ou ouvre un bloc de mémoire partagée + </refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>shmop_open</function></funcdef> + <funcdef>int <function>shm_open</function></funcdef> <paramdef>int <parameter>key</parameter></paramdef> <paramdef>string <parameter>flags</parameter></paramdef> <paramdef>int <parameter>mode</parameter></paramdef> @@ -76,246 +73,272 @@ </funcprototype> </funcsynopsis> <para> - <function>shmop_open</function> can create or open a shared memory block. + <function>shm_open</function> peut créer ou ouvrir un bloc + de mémoire partagée. </para> <para> - <function>shmop_open</function> takes 4 parameters: key, which is the - system's id for the shared memory block, this parameter can be passed - as a decimal or hex. The second parameter are the flags that you can use: + <function>shm_open</function> prend 4 paramètres: la + clé, qui sera l'identifiant système pour le bloc. + Ce parmaètre peut être passé comme + un décimal ou un héxadécimal. Le + deuxième paramètre est un groupe d'options : <itemizedlist> <listitem> <simpara> - "a" for access (sets IPC_EXCL) - use this flag when you need to open an existing shared memory segment + "a" pour accès (utilise IPC_EXCL) + utilisez cette option pour ouvrir un bloc déjà éxistant. </simpara> </listitem> <listitem> <simpara> - "c" for create (sets IPC_CREATE) - use this flag when you need to create a new shared memory segment. + "c" pour création (utilise IPC_CREATE) + utilisez cette option pour créer un nouveau bloc. </simpara> </listitem> </itemizedlist> - The third parameter is the mode, which are the permissions that you - wish to assign to your memory segment, those are the same as permission - for a file. Permissions need to be passed in octal form ex. 0644. - The last parameter is size of the shared memory block you wish to create - in bytes. - <note><simpara> - Note: the 3rd and 4th should be entered as 0 if you are opening an - existing memory segment. On success <function>shmop_open</function> will - return an id that you can use to access the shared memory segment - you've created. + Le troisième paramètre est le mode, c'est à + dire les permissions que vous donnez à ce bloc. Ce sont + les mêmes que pour les fichiers. Ces permissions doivent + être passées sous forme d'octal (i.e. 0644). + Le dernier parmètre est la taille du bloc de mémoire, + en ocets. + <note> + <simpara> + Note: Les troisième et quatrième parmaètres + doivent être passés à 0 si vous voulez ouvrir + un bloc de mémoire partagée déjà existant. + En cas de succès <function>shm_open</function> retourne un + identifiant que vous pouvez utiliser pour accéder à + la mémoire que vous venez de créer. </simpara></note> </para> <para> <example> - <title>Create a new shared memory block</title> + <title>Créer un nouveau bloc</title> <programlisting role="php"> <?php -$shm_id = shmop_open(0x0fff, "c", 0644, 100); +$shm_id = shm_open(0x0fff, "c", 0644, 100); ?> </programlisting> </example> </para> <para> - This example opened a shared memory block with a system id of 0x0fff. + Cet exemple ouvre un nouveau bloc de mémoire partagée, + dont l'identifiant est 0x0fff. </para> </refsect1> </refentry> - <refentry id="function.shmop_read"> + <refentry id="function.shm-read"> <refnamediv> - <refname>shmop_read</refname> - <refpurpose>Read data from shared memory block</refpurpose> + <refname>shm_read</refname> + <refpurpose>Lit un bloc</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcprototype> - <funcdef>string <function>shmop_read</function></funcdef> + <funcdef>string <function>shm_read</function></funcdef> <paramdef>int <parameter>shmid</parameter></paramdef> <paramdef>int <parameter>start</parameter></paramdef> <paramdef>int <parameter>count</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>shmop_read</function> will read a string from shared memory block. + <function>shm_read</function> lit une chaîne dans une bloc de + mémoire partagée. </para> <para> - <function>shmop_read</function> takes 3 parameters: shmid, which is the shared - memory block identifier created by <function>shmop_open</function>, offset from - which to start reading and count on the number of bytes to read. + <function>shm_read</function> prend 3 paramètres: + <parameter>shmid</parameter>, qui est un identifiant de + mémoire partagée, créé par + <function>shm_open</function>, <parameter>start</parameter> + qui est la position à partir de laquelle on commence + à lire dans la mémoire et <parameter>count</parameter>, + le nombre d'octets à lire. </para> <para> <example> - <title>Reading shared memory block</title> + <title>Lire un bloc de mémoire partagée</title> <programlisting role="php"> <?php -$shm_data = shmop_read($shm_id, 0, 50); +$shm_data = shm_read($shm_id, 0, 50); ?> </programlisting> </example> </para> <para> - This example will read 50 bytes from shared memory block and place the data - inside <literal>$shm_data</literal>. + Cet exemple lit 50 octets dans le bloc de mémoire partagée + <literal>$shm_data</literal>. </para> </refsect1> </refentry> - <refentry id="function.shmop_write"> + <refentry id="function.shm-write"> <refnamediv> - <refname>shmop_write</refname> - <refpurpose>Write data into shared memory block</refpurpose> + <refname>shm_write</refname> + <refpurpose>Ecrire dans un bloc de mémoire partagée</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>shmop_write</function></funcdef> + <funcdef>int <function>shm_write</function></funcdef> <paramdef>int <parameter>shmid</parameter></paramdef> <paramdef>string <parameter>data</parameter></paramdef> <paramdef>int <parameter>offset</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>shmop_write</function> will write a string into shared memory block. + <function>shm_write</function> écrit une chaîne dans + un bloc de mémoire partagée. </para> <para> - <function>shmop_write</function> takes 3 parameters: shmid, which is the - shared memory block identifier created by <function>shmop_open</function>, - data, a string that you want to write into shared memory block and offset, - which specifies where to start writing data inside the shared memory segment. + <function>shm_write</function> prend 3 paramètres: + <parameter>shmid</parameter>, qui est un identifiant de + mémoire partagée, créé par + <function>shm_open</function>, <parameter>data</parameter> + qui est la chaîne à écrire dans la + mémoire et <parameter>offset</parameter>, la + position à partir de laquelle il faut commencer + à écrire. </para> <para> <example> - <title>Writing to shared memory block</title> + <title>Ecrire un bloc de mémoire partagée</title> <programlisting role="php"> <?php -$shm_bytes_written = shmop_write($shm_id, $my_string, 0); +$shm_bytes_written = shm_write($shm_id, $my_string, 0); ?> </programlisting> </example> </para> <para> - This example will write data inside <literal>$my_string</literal> into - shared memory block, <literal>$shm_bytes_written</literal> will contain - the number of bytes written. + Cet exemple écrit les données de la chaîne + <literal>$my_string</literal> dans un bloc de mémoire + partagée. <literal>$shm_bytes_written</literal> + représentera le nombre d'octets écrits. </para> </refsect1> </refentry> - <refentry id="function.size"> + <refentry id="function.shm-size"> <refnamediv> - <refname>shmop_size</refname> - <refpurpose>Get size of shared memory block</refpurpose> + <refname>shm_size</refname> + <refpurpose>Lire la taille du bloc de mémoire partagée</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>shmop_size</function></funcdef> + <funcdef>int <function>shm_size</function></funcdef> <paramdef>int <parameter>shmid</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>shmop_size</function> is used to get the size, in bytes of the - shared memory block. + <function>shm_size</function> sert à connaître + la taille, en octets, d'un bloc de mémoire partagée. </para> <para> - <function>shmop_size</function> takes the shmid, which is the shared memory - block identifier created by <function>shmop_open</function>, the function - will return and int, which represents the number of bytes the shared memory - block occupies. + <function>shm_size</function> prend comme argument <parameter>shmid</parameter>, + un identifiant de bloc de mémoire partagée + créé par <function>shm_open</function>, et retourne + un entier, qui représente le taille de ce bloc. </para> <para> <example> - <title>Getting the size of the shared memory block</title> + <title>Lire la taille d'un bloc de mémoire partagée</title> <programlisting role="php"> <?php -$shm_size = shmop_size($shm_id); +$shm_size = shm_size($shm_id); ?> </programlisting> </example> </para> <para> - This example will put the size of shared memory block identified by - <literal>$shm_id</literal> into <literal>$shm_size</literal>. + Cet exemple lit la taille du bloc identifié par <literal>$shm_id</literal>, + et le place dans <literal>$shm_size</literal>. </para> </refsect1> </refentry> - <refentry id="function.shmop_delete"> + <refentry id="function.shm-delete"> <refnamediv> - <refname>shmop_delete</refname> - <refpurpose>Delete shared memory block</refpurpose> + <refname>shm_delete</refname> + <refpurpose> + Détruit un bloc de mémoire partagée + </refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>shmop_delete</function></funcdef> + <funcdef>int <function>shm_delete</function></funcdef> <paramdef>int <parameter>shmid</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>shmop_delete</function> is used to delete a shared memory block. + <function>shm_delete</function> sert à détruire un + bloc de mémoire partagée. </para> <para> - <function>shmop_delete</function> takes the shmid, which is the shared memory - block identifier created by <function>shmop_open</function>. On success 1 is - returned, on failure 0 is returned. + <function>shm_delete</function> prend un identifiant de + mémoire partagée <parameter>shmid</parameter>, + créé par <function>shm_open</function>. + En cas de succès, la fonction retourne 1, et sinon, 0. </para> <para> <example> - <title>Deleting shared memory block</title> + <title>Effacement d'un bloc de mémoire partagée</title> <programlisting role="php"> <?php -shmop_delete($shm_id); +shm_delete($shm_id); ?> </programlisting> </example> </para> <para> - This example will delete shared memory block identified by - <literal>$shm_id</literal>. + Ce exemple efface le bloc de mémoire partagée + identifié par <literal>$shm_id</literal>. </para> </refsect1> </refentry> - <refentry id="function.shmop_close"> + <refentry id="function.shm-close"> <refnamediv> - <refname>shmop_close</refname> - <refpurpose>Close shared memory block</refpurpose> + <refname>shm_close</refname> + <refpurpose>Ferme un bloc de mémoire partagée</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>shmop_close</function></funcdef> + <funcdef>int <function>shm_close</function></funcdef> <paramdef>int <parameter>shmid</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>shmop_close</function> is used to close a shared memory block. + <function>shm_close</function> sert à fermer un bloc de + mémoire partagée. </para> <para> - <function>shmop_close</function> takes the shmid, which is the shared memory - block identifier created by <function>shmop_open</function>. + <function>shm_close</function> prend un identifiant de mémoire + partagée, <parameter>shmid</parameter>, créé par + <function>shm_open</function>. </para> <para> <example> - <title>Closing shared memory block</title> + <title>Fermeture d'un bloc de mémoire partagée</title> <programlisting role="php"> <?php -shmop_close($shm_id); +shm_close($shm_id); ?> </programlisting> </example> </para> <para> - This example will close shared memory block identified by <literal>$shm_id</literal>. + Cet exemple ferme le bloc de mémoire partagée + identifié par <literal>$shm_id</literal>. </para> </refsect1> </refentry>
Index: phpdoc/fr/functions/shmop.xml diff -u phpdoc/fr/functions/shmop.xml:1.3 phpdoc/fr/functions/shmop.xml:1.4 --- phpdoc/fr/functions/shmop.xml:1.3 Fri Oct 20 15:45:11 2000 +++ phpdoc/fr/functions/shmop.xml Mon Nov 6 06:08:24 2000 @@ -1,57 +1,52 @@ <reference id="ref.shmop"> - <title>Shared Memory Functions</title> + <title>Mémoire partagée</title> <titleabbrev>shmop</titleabbrev> <partintro> <para> - Shmop is an easy to use set of functions that allows php to read, - write, create and delete UNIX shared memory segments. The functions - will not work on windows, as it does not support shared memory. To - use shmop you will need to compile php with the --enable-shmop parameter - in your configure line. + Shmop est un ensemble de fonctions simples pour gérer + la mémoire partagée avec PHP (lecture, + écriture, création et suppressions de segments de + mémoire paragée UNIX). Ces fonctions ne fonctionnent pas + sous Windows, car ce système d'exploitation ne supporte pas + la mémoire partagée. Pour utiliser les fonctions + shmop, compilez PHP avec l'option --enable-shmop parameter. </para> - <note> - <simpara> - The functions explained in the chapter begin all with - <function>shm_</function> in PHP 4.0.3, but in PHP 4.0.4 and later - versions these names are changed to begin with - <function>shmop_</function>. - </simpara> - </note> <para> <example> - <title>Shared Memory Operations Overview</title> + <title>Introduction à la mémoire partagée</title> <programlisting role="php"> <?php -// Create 100 byte shared memory block with system id if 0xff3 -$shm_id = shmop_open(0xff3, "c", 0644, 100); +// Crée 100 octets de mémoire partagée avec +// un identifiant système "0xff3" +$shm_id = shm_open(0xff3, "c", 0644, 100); if(!$shm_id) { - echo "Couldn't create shared memory segment\n"; + echo "Impossible de créer la mémoire partagée\n"; } -// Get shared memory block's size -$shm_size = shmop_size($shm_id); -echo "SHM Block Size: ".$shm_size. " has been created.\n"; +// Lire la taille de la mémoire partagée +$shm_size = shm_size($shm_id); +echo "Un bloc de SHM de taille ".$shm_size. " a été créé.\n"; -// Lets write a test string into shared memory -$shm_bytes_written = shmop_write($shm_id, "my shared memory block", 0); -if($shm_bytes_written != strlen("my shared memory block")) { - echo "Couldn't write the entire length of data\n"; +// Ecriture d'une chaîne de test dans ce segment +$shm_bytes_written = shm_write($shm_id, "mon bloc de mémoire partagée", 0); +if($shm_bytes_written != strlen("mon bloc de mémoire partagée")) { + echo "Impossible d'écrire toutes les données en mémoire\n"; } -// Now lets read the string back -$my_string = shmop_read($shm_id, 0, $shm_size); +// Lecture du segment +$my_string = shm_read($shm_id, 0, $shm_size); if(!$my_string) { - echo "Couldn't read from shared memory block\n"; + echo "Impossible de lire toutes les données en mémoire\n"; } -echo "The data inside shared memory was: ".$my_string."\n"; +echo "Les données mis en mémoire partagées sont : ".$my_string."\n"; -//Now lets delete the block and close the shared memory segment -if(!shmop_delete($shm_id)) { - echo "Couldn't mark shared memory block for deletion. +//Maintenant, effacons le bloc, et fermons le segment de mémoire +if(!shm_delete($shm_id)) { + echo "Impossible d'effacer le segment de mémoire"; } -shmop_close($shm_id); +shm_close($shm_id); ?> </programlisting> @@ -59,16 +54,18 @@ </para> </partintro> - <refentry id="function.shmop_open"> + <refentry id="function.shm-open"> <refnamediv> - <refname>shmop_open</refname> - <refpurpose>Create or open shared memory block</refpurpose> + <refname>shm_open</refname> + <refpurpose> + Crée ou ouvre un bloc de mémoire partagée + </refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>shmop_open</function></funcdef> + <funcdef>int <function>shm_open</function></funcdef> <paramdef>int <parameter>key</parameter></paramdef> <paramdef>string <parameter>flags</parameter></paramdef> <paramdef>int <parameter>mode</parameter></paramdef> @@ -76,246 +73,272 @@ </funcprototype> </funcsynopsis> <para> - <function>shmop_open</function> can create or open a shared memory block. + <function>shm_open</function> peut créer ou ouvrir un bloc + de mémoire partagée. </para> <para> - <function>shmop_open</function> takes 4 parameters: key, which is the - system's id for the shared memory block, this parameter can be passed - as a decimal or hex. The second parameter are the flags that you can use: + <function>shm_open</function> prend 4 paramètres: la + clé, qui sera l'identifiant système pour le bloc. + Ce parmaètre peut être passé comme + un décimal ou un héxadécimal. Le + deuxième paramètre est un groupe d'options : <itemizedlist> <listitem> <simpara> - "a" for access (sets IPC_EXCL) - use this flag when you need to open an existing shared memory segment + "a" pour accès (utilise IPC_EXCL) + utilisez cette option pour ouvrir un bloc déjà éxistant. </simpara> </listitem> <listitem> <simpara> - "c" for create (sets IPC_CREATE) - use this flag when you need to create a new shared memory segment. + "c" pour création (utilise IPC_CREATE) + utilisez cette option pour créer un nouveau bloc. </simpara> </listitem> </itemizedlist> - The third parameter is the mode, which are the permissions that you - wish to assign to your memory segment, those are the same as permission - for a file. Permissions need to be passed in octal form ex. 0644. - The last parameter is size of the shared memory block you wish to create - in bytes. - <note><simpara> - Note: the 3rd and 4th should be entered as 0 if you are opening an - existing memory segment. On success <function>shmop_open</function> will - return an id that you can use to access the shared memory segment - you've created. + Le troisième paramètre est le mode, c'est à + dire les permissions que vous donnez à ce bloc. Ce sont + les mêmes que pour les fichiers. Ces permissions doivent + être passées sous forme d'octal (i.e. 0644). + Le dernier parmètre est la taille du bloc de mémoire, + en ocets. + <note> + <simpara> + Note: Les troisième et quatrième parmaètres + doivent être passés à 0 si vous voulez ouvrir + un bloc de mémoire partagée déjà existant. + En cas de succès <function>shm_open</function> retourne un + identifiant que vous pouvez utiliser pour accéder à + la mémoire que vous venez de créer. </simpara></note> </para> <para> <example> - <title>Create a new shared memory block</title> + <title>Créer un nouveau bloc</title> <programlisting role="php"> <?php -$shm_id = shmop_open(0x0fff, "c", 0644, 100); +$shm_id = shm_open(0x0fff, "c", 0644, 100); ?> </programlisting> </example> </para> <para> - This example opened a shared memory block with a system id of 0x0fff. + Cet exemple ouvre un nouveau bloc de mémoire partagée, + dont l'identifiant est 0x0fff. </para> </refsect1> </refentry> - <refentry id="function.shmop_read"> + <refentry id="function.shm-read"> <refnamediv> - <refname>shmop_read</refname> - <refpurpose>Read data from shared memory block</refpurpose> + <refname>shm_read</refname> + <refpurpose>Lit un bloc</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcprototype> - <funcdef>string <function>shmop_read</function></funcdef> + <funcdef>string <function>shm_read</function></funcdef> <paramdef>int <parameter>shmid</parameter></paramdef> <paramdef>int <parameter>start</parameter></paramdef> <paramdef>int <parameter>count</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>shmop_read</function> will read a string from shared memory block. + <function>shm_read</function> lit une chaîne dans une bloc de + mémoire partagée. </para> <para> - <function>shmop_read</function> takes 3 parameters: shmid, which is the shared - memory block identifier created by <function>shmop_open</function>, offset from - which to start reading and count on the number of bytes to read. + <function>shm_read</function> prend 3 paramètres: + <parameter>shmid</parameter>, qui est un identifiant de + mémoire partagée, créé par + <function>shm_open</function>, <parameter>start</parameter> + qui est la position à partir de laquelle on commence + à lire dans la mémoire et <parameter>count</parameter>, + le nombre d'octets à lire. </para> <para> <example> - <title>Reading shared memory block</title> + <title>Lire un bloc de mémoire partagée</title> <programlisting role="php"> <?php -$shm_data = shmop_read($shm_id, 0, 50); +$shm_data = shm_read($shm_id, 0, 50); ?> </programlisting> </example> </para> <para> - This example will read 50 bytes from shared memory block and place the data - inside <literal>$shm_data</literal>. + Cet exemple lit 50 octets dans le bloc de mémoire partagée + <literal>$shm_data</literal>. </para> </refsect1> </refentry> - <refentry id="function.shmop_write"> + <refentry id="function.shm-write"> <refnamediv> - <refname>shmop_write</refname> - <refpurpose>Write data into shared memory block</refpurpose> + <refname>shm_write</refname> + <refpurpose>Ecrire dans un bloc de mémoire partagée</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>shmop_write</function></funcdef> + <funcdef>int <function>shm_write</function></funcdef> <paramdef>int <parameter>shmid</parameter></paramdef> <paramdef>string <parameter>data</parameter></paramdef> <paramdef>int <parameter>offset</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>shmop_write</function> will write a string into shared memory block. + <function>shm_write</function> écrit une chaîne dans + un bloc de mémoire partagée. </para> <para> - <function>shmop_write</function> takes 3 parameters: shmid, which is the - shared memory block identifier created by <function>shmop_open</function>, - data, a string that you want to write into shared memory block and offset, - which specifies where to start writing data inside the shared memory segment. + <function>shm_write</function> prend 3 paramètres: + <parameter>shmid</parameter>, qui est un identifiant de + mémoire partagée, créé par + <function>shm_open</function>, <parameter>data</parameter> + qui est la chaîne à écrire dans la + mémoire et <parameter>offset</parameter>, la + position à partir de laquelle il faut commencer + à écrire. </para> <para> <example> - <title>Writing to shared memory block</title> + <title>Ecrire un bloc de mémoire partagée</title> <programlisting role="php"> <?php -$shm_bytes_written = shmop_write($shm_id, $my_string, 0); +$shm_bytes_written = shm_write($shm_id, $my_string, 0); ?> </programlisting> </example> </para> <para> - This example will write data inside <literal>$my_string</literal> into - shared memory block, <literal>$shm_bytes_written</literal> will contain - the number of bytes written. + Cet exemple écrit les données de la chaîne + <literal>$my_string</literal> dans un bloc de mémoire + partagée. <literal>$shm_bytes_written</literal> + représentera le nombre d'octets écrits. </para> </refsect1> </refentry> - <refentry id="function.size"> + <refentry id="function.shm-size"> <refnamediv> - <refname>shmop_size</refname> - <refpurpose>Get size of shared memory block</refpurpose> + <refname>shm_size</refname> + <refpurpose>Lire la taille du bloc de mémoire partagée</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>shmop_size</function></funcdef> + <funcdef>int <function>shm_size</function></funcdef> <paramdef>int <parameter>shmid</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>shmop_size</function> is used to get the size, in bytes of the - shared memory block. + <function>shm_size</function> sert à connaître + la taille, en octets, d'un bloc de mémoire partagée. </para> <para> - <function>shmop_size</function> takes the shmid, which is the shared memory - block identifier created by <function>shmop_open</function>, the function - will return and int, which represents the number of bytes the shared memory - block occupies. + <function>shm_size</function> prend comme argument <parameter>shmid</parameter>, + un identifiant de bloc de mémoire partagée + créé par <function>shm_open</function>, et retourne + un entier, qui représente le taille de ce bloc. </para> <para> <example> - <title>Getting the size of the shared memory block</title> + <title>Lire la taille d'un bloc de mémoire partagée</title> <programlisting role="php"> <?php -$shm_size = shmop_size($shm_id); +$shm_size = shm_size($shm_id); ?> </programlisting> </example> </para> <para> - This example will put the size of shared memory block identified by - <literal>$shm_id</literal> into <literal>$shm_size</literal>. + Cet exemple lit la taille du bloc identifié par <literal>$shm_id</literal>, + et le place dans <literal>$shm_size</literal>. </para> </refsect1> </refentry> - <refentry id="function.shmop_delete"> + <refentry id="function.shm-delete"> <refnamediv> - <refname>shmop_delete</refname> - <refpurpose>Delete shared memory block</refpurpose> + <refname>shm_delete</refname> + <refpurpose> + Détruit un bloc de mémoire partagée + </refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>shmop_delete</function></funcdef> + <funcdef>int <function>shm_delete</function></funcdef> <paramdef>int <parameter>shmid</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>shmop_delete</function> is used to delete a shared memory block. + <function>shm_delete</function> sert à détruire un + bloc de mémoire partagée. </para> <para> - <function>shmop_delete</function> takes the shmid, which is the shared memory - block identifier created by <function>shmop_open</function>. On success 1 is - returned, on failure 0 is returned. + <function>shm_delete</function> prend un identifiant de + mémoire partagée <parameter>shmid</parameter>, + créé par <function>shm_open</function>. + En cas de succès, la fonction retourne 1, et sinon, 0. </para> <para> <example> - <title>Deleting shared memory block</title> + <title>Effacement d'un bloc de mémoire partagée</title> <programlisting role="php"> <?php -shmop_delete($shm_id); +shm_delete($shm_id); ?> </programlisting> </example> </para> <para> - This example will delete shared memory block identified by - <literal>$shm_id</literal>. + Ce exemple efface le bloc de mémoire partagée + identifié par <literal>$shm_id</literal>. </para> </refsect1> </refentry> - <refentry id="function.shmop_close"> + <refentry id="function.shm-close"> <refnamediv> - <refname>shmop_close</refname> - <refpurpose>Close shared memory block</refpurpose> + <refname>shm_close</refname> + <refpurpose>Ferme un bloc de mémoire partagée</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>shmop_close</function></funcdef> + <funcdef>int <function>shm_close</function></funcdef> <paramdef>int <parameter>shmid</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>shmop_close</function> is used to close a shared memory block. + <function>shm_close</function> sert à fermer un bloc de + mémoire partagée. </para> <para> - <function>shmop_close</function> takes the shmid, which is the shared memory - block identifier created by <function>shmop_open</function>. + <function>shm_close</function> prend un identifiant de mémoire + partagée, <parameter>shmid</parameter>, créé par + <function>shm_open</function>. </para> <para> <example> - <title>Closing shared memory block</title> + <title>Fermeture d'un bloc de mémoire partagée</title> <programlisting role="php"> <?php -shmop_close($shm_id); +shm_close($shm_id); ?> </programlisting> </example> </para> <para> - This example will close shared memory block identified by <literal>$shm_id</literal>. + Cet exemple ferme le bloc de mémoire partagée + identifié par <literal>$shm_id</literal>. </para> </refsect1> </refentry>