You are here: Re: [PHP] Wierd error « PHP « IT news, forums, messages
Re: [PHP] Wierd error

Posted by "Chris Boget" on 11/17/05 18:21

>> We were using unset() for the longest time but found it doesn't
>> seem to free up the memory.
> interesting - you are suggesting that settype does free the memory
> directly?

Yes. Moreso than unset(), at least according to my observations and
tests.

> I have seen a number of posts to internals regarding to being able to
> free up memory in long-running/heavy cli scripts... none of the devs
> mentioned settype() ... maybe you know something nobody else does :-)

We have a very process intensive script that creates (and destroys) a
large number of objects. As this script gets run again and again, we
would see that the memory load would go through the roof and eventually
cause Apache to crash (among other things; btw - this is running on
a windoze box). We changed all the unset() to settype() and the
memory usage over the same amount of time dropped dramatically -
significantly, in fact.

thnx,
Chris

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация