If you're using shared memory, what does the ipcs look like? maybe I'm crazy, and that's very possible, but Using IPC::Shareable as long as you use the same "glue" your data will share the memory space alotted.. This may or may not be helpful to you as I'm not sure what you're doing with the shared memory. Also, with IPC::Shareable if you are attempting to lock the shared memory from the other processes, you'll have some problems as children inherit locks from their parents and that gets kinda messy. Check the results of an 'ipcs' on the system.. and clean up old semaphores and shared memory handles.

General memory saving tips that I use, (feel free to beat me if this sounds stupid).
1) Scope - never allow variables to exist where they dont' need to.
2) If there's a potential to return 5 bazillion records or lines on a db query/file open, process the records line by line.. don't read them all into an array and THEN work on them one at a time.
3) Pass references to sub routines, not copies. (this could be dangerous so WATCH WHAT YOU ARE DOING!)
4) Buy more RAM, its like dirt cheap! ;)

That's all I could think of off the top of my head.. if you provide a little more insight into what you're doing, maybe an example piece of code, we might be able to help more..


-brad..

In reply to Re: collective unconcious (about shared memory...) by reyjrar
in thread collective unconcious (about shared memory...) by dshahin

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.