tor-browser

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

pr_unmap.rst (862B)


      1 PR_MemUnmap
      2 ===========
      3 
      4 Unmap a memory region that is backed by a memory-mapped file.
      5 
      6 
      7 Syntax
      8 ------
      9 
     10 .. code::
     11 
     12   #include <prio.h>
     13 
     14   PRStatus PR_MemUnmap(
     15     void *addr,
     16     PRUint32 len);
     17 
     18 
     19 Parameters
     20 ~~~~~~~~~~
     21 
     22 The function has the following parameters:
     23 
     24 ``addr``
     25   The starting address of the memory region to be unmapped.
     26 ``len``
     27   The length, in bytes, of the memory region.
     28 
     29 
     30 Returns
     31 ~~~~~~~
     32 
     33 The function returns one of the following values:
     34 
     35 -  If the memory region is successfully unmapped, ``PR_SUCCESS``.
     36 -  If the memory region is not successfully unmapped, ``PR_FAILURE``.
     37   The error code can be retrieved via :ref:`PR_GetError`.
     38 
     39 
     40 Description
     41 -----------
     42 
     43 :ref:`PR_MemUnmap` removes the file mapping for the memory region
     44 (``addr``, ``addr + len``). The parameter ``addr`` is the return value
     45 of an earlier call to :ref:`PR_MemMap`.