tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

pr_attachsharedmemory.rst (843B)


      1 PR_AttachSharedMemory
      2 =====================
      3 
      4 Attaches a memory segment previously opened with :ref:`PR_OpenSharedMemory`
      5 and maps it into the process memory space.
      6 
      7 
      8 Syntax
      9 ------
     10 
     11 .. code::
     12 
     13   #include <prshm.h>
     14 
     15 .. code::
     16 
     17   NSPR_API( void * )
     18     PR_AttachSharedMemory(
     19        PRSharedMemory *shm,
     20        PRIntn flags
     21   );
     22 
     23   /* Define values for PR_AttachSharedMemory(...,flags) */
     24   #define PR_SHM_READONLY 0x01
     25 
     26 
     27 Parameters
     28 ~~~~~~~~~~
     29 
     30 The function has these parameters:
     31 
     32 shm
     33   The handle returned from :ref:`PR_OpenSharedMemory`.
     34 flags
     35   Options for mapping the shared memory. ``PR_SHM_READONLY`` causes the
     36   memory to be attached read-only.
     37 
     38 
     39 Returns
     40 ~~~~~~~
     41 
     42 Address where shared memory is mapped, or ``NULL`` if an error occurs.
     43 Retrieve the reason for the failure by calling :ref:`PR_GetError` and
     44 :ref:`PR_GetOSError`.