I'm running a PHP script (CLI) to calculate a big thing. It will probably be an (almost) infinite loop but after 17000 runs I run out of memory. Can I some way dump some memory (say like every 1000th run) so I can keep running it forever?

/Max