{
    "content": [
        {
            "type": "text",
            "text": "# SHM_OVERVIEW (info)\n\n## NAME\n\nshmoverview - overview of POSIX shared memory\n\n## DESCRIPTION\n\nThe POSIX shared memory API allows processes to communicate information\nby sharing a region of memory.\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION**\n- **NOTES**\n- **SEE ALSO**\n- **COLOPHON**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "SHM_OVERVIEW",
        "section": "",
        "mode": "info",
        "summary": "shmoverview - overview of POSIX shared memory",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "fchmod",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/fchmod/2/json"
            },
            {
                "name": "fchown",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/fchown/2/json"
            },
            {
                "name": "fstat",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/fstat/2/json"
            },
            {
                "name": "ftruncate",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/ftruncate/2/json"
            },
            {
                "name": "mmap",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/mmap/2/json"
            },
            {
                "name": "mprotect",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/mprotect/2/json"
            },
            {
                "name": "munmap",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/munmap/2/json"
            },
            {
                "name": "shmget",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/shmget/2/json"
            },
            {
                "name": "shmop",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/shmop/2/json"
            },
            {
                "name": "shmopen",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/shmopen/3/json"
            },
            {
                "name": "shmunlink",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/shmunlink/3/json"
            },
            {
                "name": "view",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/view/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 51,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "COLOPHON",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "shmoverview - overview of POSIX shared memory\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The POSIX shared memory API allows processes to communicate information\nby sharing a region of memory.\n\nThe interfaces employed in the API are:\n\nshmopen(3)    Create and open a new object, or open  an  existing  ob-\nject.  This is analogous to open(2).  The call returns a\nfile descriptor for use by the other  interfaces  listed\nbelow.\n\nftruncate(2)   Set the size of the shared memory object.  (A newly cre-\nated shared memory object has a length of zero.)\n\nmmap(2)        Map the shared memory object into  the  virtual  address\nspace of the calling process.\n\nmunmap(2)      Unmap  the shared memory object from the virtual address\nspace of the calling process.\n\nshmunlink(3)  Remove a shared memory object name.\n\nclose(2)       Close the file descriptor allocated by shmopen(3)  when\nit is no longer needed.\n\nfstat(2)       Obtain a stat structure that describes the shared memory\nobject.  Among the information returned by this call are\nthe  object's  size  (stsize),  permissions  (stmode),\nowner (stuid), and group (stgid).\n\nfchown(2)      To change the ownership of a shared memory object.\n\nfchmod(2)      To change the permissions of a shared memory object.\n\nVersions\nPOSIX shared memory is supported since Linux 2.4 and glibc 2.2.\n\nPersistence\nPOSIX shared memory objects have kernel persistence:  a  shared  memory\nobject will exist until the system is shut down, or until all processes\nhave unmapped the object and it has been deleted with shmunlink(3)\n\nLinking\nPrograms using the POSIX shared memory API must  be  compiled  with  cc\n-lrt to link against the real-time library, librt.\n\nAccessing shared memory objects via the filesystem\nOn  Linux,  shared  memory  objects are created in a (tmpfs(5)) virtual\nfilesystem, normally mounted  under  /dev/shm.   Since  kernel  2.6.19,\nLinux  supports  the  use of access control lists (ACLs) to control the\npermissions of objects in the virtual filesystem.\n",
                "subsections": []
            },
            "NOTES": {
                "content": "Typically, processes must synchronize their access to a  shared  memory\nobject, using, for example, POSIX semaphores.\n\nSystem  V  shared memory (shmget(2), shmop(2), etc.) is an older shared\nmemory API.  POSIX shared memory provides a  simpler,  and  better  de-\nsigned  interface;  on  the  other hand POSIX shared memory is somewhat\nless widely available (especially  on  older  systems)  than  System  V\nshared memory.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "fchmod(2),  fchown(2),  fstat(2),  ftruncate(2),  mmap(2), mprotect(2),\nmunmap(2), shmget(2), shmop(2), shmopen(3),  shmunlink(3),  semover-\nview(7)\n",
                "subsections": []
            },
            "COLOPHON": {
                "content": "This  page  is  part of release 5.10 of the Linux man-pages project.  A\ndescription of the project, information about reporting bugs,  and  the\nlatest     version     of     this    page,    can    be    found    at\nhttps://www.kernel.org/doc/man-pages/.\n\nLinux                             2020-08-13                   SHMOVERVIEW(7)",
                "subsections": []
            }
        }
    }
}