in reply to Forking and sharing variables
Also, from what I understand, at the end of the program you need to call IPC::Shareable->clean_up or the shared memory segment persists after the program ends, which is probably not desirable.
The last thing, which is one I couldn't get past, is that I seem to be running out of memory when creating the tied %mxs hash when using your method of defining it. It doesn't happen on a small list, but when I tried it on a list of 200 addresses I get:
So I added size => 8000000 to %options and that just led me to plain old Out of memory!IPC::Shareable::SharedMem: shmget: No space left on device at /usr/lib/perl5/site_perl/5.005/IPC/Shareable.pm line 446 Could not create shared memory segment: No space left on device at ./mx.pl line 39
I can't see why it should take more than 8 megabytes of memory to store MX servers for 200 domains. It didn't do this in my example code. But I don't see anything radically different about defining the %mxs hash ahead of time that would cause this.
Any ideas?
|
|---|