What I need to do is fill memory, a little at a time. Im trying to force OOM errors. Whith the following Perl exits w/ Out of memory, but no OOM kills. Any ideas?<br /><br />This is what Im using. I also have ulimit set to unlimited. It looks like Perl is doing the right thing, by just die-ing. Is there anyway to force it do the wrong thing?<br /><br />#!/usr/bin/perl<br /><br />use strict;<br />use warnings;<br />use Devel::Size qw(size);<br /><br />my @mem;<br /><br />while (1)<br />{<br />   {<br />       open my $contents, &quot;test.256MB&quot; or<br />           die &quot;Unable to open test.256MB: $!\n&quot;;<br />       while ( &lt;$contents&gt; )<br />       {<br />           push @mem, $_;<br />       }<br />   }<br />   my $size = size(\@mem);<br />   print &quot;Size = $size \n&quot;;<br />}<br /><br />On Nov 17, 2009 9:27am, Ricardo Signes &lt;perl.abe@rjbs.manxome.org&gt; wrote:<br />&gt; * fiedlert@gmail.com [2009-11-17T09:14:39]<br />&gt; <br />&gt; &gt; Anyone know if there is a way to retrieve the amount of memory a variable<br />&gt; <br />&gt; &gt; is using from within Perl?<br />&gt; <br />&gt; <br />&gt; <br />&gt; Devel::Size is pretty good.<br />&gt; <br />&gt; <br />&gt; <br />&gt; --<br />&gt; <br />&gt; rjbs<br />&gt; <br />&gt; _______________________________________________<br />&gt; <br />&gt; ABE-pm mailing list<br />&gt; <br />&gt; ABE-pm@pm.org<br />&gt; <br />&gt; http://mail.pm.org/mailman/listinfo/abe-pm<br />&gt;