Ok, this may be one of the dumbest "I didnt RTFM" type question, and mabye Im a bit confused on how shmem works, but I am utilizing IPC::Shareable in a program of mine to store a hash of hashes into memory, so the next time the program runs, it can do what it was needs to do and see what has changed within the hash.
Here is the stuff that gets tied into memory
use IPC::Shareable; my %peering; my %lastpeering; my %options_now = ( create => 'yes', exclusive => 'no', mode => 0666, destroy => 'no' ); my %options_then = ( create => 'yes', exclusive => 'no', mode => 0666, destroy => 'no' ); tie %lastpeering, 'IPC::Shareable', $glue, \%options2 or die "tie fa +iled\n"; tie %peering, 'IPC::Shareable', $glue, \%options or die "tie failed\n" +;
....... Ok everything is fine and dandy, I can get the information back fine on the next run and see what was in %lastpeering from memory, but uhhh:
ipcs ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status + 0x30787566 896513 mthomas 666 65536 0 + 0x0000715f 896515 mthomas 666 65536 0 + 0x0004d733 896516 mthomas 666 65536 0 + 0x000d0241 896517 mthomas 666 65536 0 + 0x00001058 896518 mthomas 666 65536 0 + 0x000f1708 896519 mthomas 666 65536 0 + 0x00078ab1 896520 mthomas 666 65536 0 + 0x00023842 896521 mthomas 666 65536 0 + 0x00011d03 896522 mthomas 666 65536 0 + 0x00094861 896523 mthomas 666 65536 0 + 0x000c10f3 896524 mthomas 666 65536 0 + 0x0000e876 896525 mthomas 666 65536 0 + 0x00023a9c 896526 mthomas 666 65536 0 + 0x000071f6 896527 mthomas 666 65536 0 + ------ Semaphore Arrays -------- key semid owner perms nsems status 0x30787566 896640 mthomas 666 2 0x0000715f 896642 mthomas 666 2 0x0004d733 896643 mthomas 666 2 0x000d0241 896644 mthomas 666 2 0x00001058 896645 mthomas 666 2 0x000f1708 896646 mthomas 666 2 0x00078ab1 896647 mthomas 666 2 0x00023842 896648 mthomas 666 2 0x00011d03 896649 mthomas 666 2 0x00094861 896650 mthomas 666 2 0x000c10f3 896651 mthomas 666 2 0x0000e876 896652 mthomas 666 2 0x00023a9c 896653 mthomas 666 2 0x000071f6 896654 mthomas 666 2


That was only after one run of the program, (I cleared all previous from mem manually using ipcrm), now my question is, is it SUPPOSED to do that? It looks as if its creating a new memory handle for each $blah{new memory}{new memory}{new memory}, as I stated before, the hash in which I am attempting to put into memory is a hash of hash's. Any input would be grand! Thanks,
Mark

In reply to IPC Shared Memory Question by cleen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.