<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic shared memory in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shared-memory/m-p/4300420#M338030</link>
    <description>hello all,&lt;BR /&gt;i have problem with shared memory.&lt;BR /&gt;we have to create shared memory of about more than 700mb. and it looks like when creating it with shmget() command it is created as a contiguous block.( which i am not sure).&lt;BR /&gt;&lt;BR /&gt;so my question is when we create shared memory will it be created as contiguous. if it is there a way i can make to create non contiguous for the same key value.&lt;BR /&gt;or is there a way i can create shared memory dynamically for the same key.&lt;BR /&gt;&lt;BR /&gt;please give your thoughts &lt;BR /&gt;thanks in advance.&lt;BR /&gt;</description>
    <pubDate>Tue, 04 Nov 2008 22:25:13 GMT</pubDate>
    <dc:creator>unix_starter</dc:creator>
    <dc:date>2008-11-04T22:25:13Z</dc:date>
    <item>
      <title>shared memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shared-memory/m-p/4300420#M338030</link>
      <description>hello all,&lt;BR /&gt;i have problem with shared memory.&lt;BR /&gt;we have to create shared memory of about more than 700mb. and it looks like when creating it with shmget() command it is created as a contiguous block.( which i am not sure).&lt;BR /&gt;&lt;BR /&gt;so my question is when we create shared memory will it be created as contiguous. if it is there a way i can make to create non contiguous for the same key value.&lt;BR /&gt;or is there a way i can create shared memory dynamically for the same key.&lt;BR /&gt;&lt;BR /&gt;please give your thoughts &lt;BR /&gt;thanks in advance.&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Nov 2008 22:25:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shared-memory/m-p/4300420#M338030</guid>
      <dc:creator>unix_starter</dc:creator>
      <dc:date>2008-11-04T22:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: shared memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shared-memory/m-p/4300421#M338031</link>
      <description>When you call shmget() it will create a shared memory virtual object. Such an object is assigned a virtual address range (the start of which is returned via shmat() calls).&lt;BR /&gt;&lt;BR /&gt;Being a single virtual object -- um... it rather *must* be virtually contiguous. (How precisely would you find the other parts of the segment? There is no "shmat_again()" interface or anything like it). If what you want is a shared memory segment using holes in your virtual address space but created in a single call -- there is no such thing and frankly, I wouldn't expect any enhancement request for such an interface to be fulfilled. (If you really want this kind of thing -- just use MAP_SHARED mmap() with either MAP_ANONYMOUS or a temporary file or something).&lt;BR /&gt;&lt;BR /&gt;There is zero guarantee that the physical memory when assigned to the object is contiguous or not.&lt;BR /&gt;&lt;BR /&gt;There is zero guarantee (barring use of MPAS, but then only for the Private virtual address assigned on shmat() calls) that subsequent objects created via other shmget() [or mmap(), etc.] calls are virtually contiguous.</description>
      <pubDate>Tue, 04 Nov 2008 22:57:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shared-memory/m-p/4300421#M338031</guid>
      <dc:creator>Don Morris_1</dc:creator>
      <dc:date>2008-11-04T22:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: shared memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shared-memory/m-p/4300422#M338032</link>
      <description>hello thanks for info.&lt;BR /&gt;i have one clarification though, so when i create with mmap then it will create the memory not in one contiguous block right ..?&lt;BR /&gt;&lt;BR /&gt;and can we share this block of memory created with mmap be shared among process.&lt;BR /&gt;&lt;BR /&gt;thanks</description>
      <pubDate>Tue, 04 Nov 2008 23:27:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shared-memory/m-p/4300422#M338032</guid>
      <dc:creator>unix_starter</dc:creator>
      <dc:date>2008-11-04T23:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: shared memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shared-memory/m-p/4300423#M338033</link>
      <description>No, each call to mmap() will be a contiguous virtual object. The difference is that you can make multiple mmap() calls to share a single underlying file between processes (so the data can live beyond a single process and the mapped ranges don't have to be contiguous even though the data is).&lt;BR /&gt;&lt;BR /&gt;MAP_SHARED|MAP_FILE will mmap a file range for a given offset and size, use that within each process.&lt;BR /&gt;&lt;BR /&gt;If you don't want to use file backing -- MAP_ANONYMOUS will use RAM to back the mmap -- but these can only be shared among a process and its descendants, and will not live beyond the last mmap'er [so if all the processes quit -- any data is lost. Fine if that's your intention, but worth pointing out].&lt;BR /&gt;&lt;BR /&gt;man 2 mmap for full details -- there's quite simply a lot of details to cover that it would be pointless to repeat here.</description>
      <pubDate>Wed, 05 Nov 2008 00:30:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shared-memory/m-p/4300423#M338033</guid>
      <dc:creator>Don Morris_1</dc:creator>
      <dc:date>2008-11-05T00:30:53Z</dc:date>
    </item>
  </channel>
</rss>

