Re: Memory
| From: | Richard Lynch | Date: | Thu, 12 Oct 2006 22:01:47 +0000 |
| Subject: | Re: Memory | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-243061@lists.php.net to get a copy of this message | ||
On Thu, October 12, 2006 2:23 pm, Doug Fulton wrote:
> I'm running out of memory even though I upped it to
> "memory_limit = 500M" in php.ini.
> Error messages and script are below. Thanks in advance for any tips.
>
> $ php -c /usr/local/php5/lib/php.ini createPseudoIDs.php >
> crosswalk.txt
> php(780) malloc: *** vm_allocate(size=1069056) failed (error code=3)
> php(780) malloc: *** error: can't allocate region
> php(780) malloc: *** set a breakpoint in szone_error to debug
> FATAL: emalloc(): Unable to allocate 37 bytes
You could re-write this easily enough to just loop from 0 to
9999999999 and echo out the keys, without storing any of them in RAM,
other than the one you are working on.
That will work quite nicely.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?