Perl - Out of Memory!
Background Knowledge
This case was done on a machine running OpenBSD i386 v3.7 operating system with Perl v5.8.6 built for i386-openbsd using BASH as the command prompt interrupter.
I’ll be honest I have very little knowledge of Perl so if you have anything to comment on or suggest please do so.
Problem
I tried to install a couple Perl modules and received an error message of “Out of Memory!”.
Solution
Just to clarify I have very little knowledge when it comes to Perl, so this solution may or may not work for you.
On Unix machines each user has a ulimit or “user limit” which is basically from what I understand sets the limit for each resource to ensure the system is not over loaded or abused. In this case at least for me, my issue was not having a big enough data seg size. Type at the command prompt without quotes “ulimit -a” to see a list of the set limits. I increased my data seg size from 76800 to 200000. I did this by typing at the command prompt without quotes, “ulimit -d 200000″.
You may need to play with this value for your case or other ulimits. Don’t worry about the changes as none of them are permanent in this case, at least to my knowledge. When you use the ulimit it only changes it for the user you are using and for that given session. If you require more permanent changes look into using ulimit in the login script or better yet change your system configuration settings.
Comments/Thanks
Many thanks to Scott Corley who posted an excellent blog entry entitled “perl Out of memory! (with solution)” on his blog called “Red Mercury Labs”. Without this I was getting know where fast.
If anyone can provide some further knowledge on ulimit it would be much appreciated.
Source: Red Mercury Labs - perl Out of memory! (with solution)

