Re: [PHP] free allocated memory: HOW ?

2007-04-13 Thread Arthur Erdös
> Reading in the template should only happen once and take roughly as much > memory as the file is big. > > If the file is 20k, memory should go up roughly by that much. > > If it's going up a lot more, something is going wrong (either you're > doing something wrong or you're not just reading t

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Arthur Erdös
Am Freitag, den 13.04.2007, 16:03 +1000 schrieb Chris: > > ok, the complete workflow is a little bit complicated. we are using a > > workflow engine and the newsletter generator is one step of three. the > > first cleans the statistics data, the second generates the new data and > > the third is th

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Arthur Erdös
It can if you're trying to process a borked image... I've had imagecreatefromjpeg() eat memory up to almost 50x the size of the image before finally deciding it can't handle it and crapping out. That was *after* running it through getimagesize() with no problem at all. okay - good point - but i

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Arthur Erdös
> Just post your source already. > ok, the complete workflow is a little bit complicated. we are using a workflow engine and the newsletter generator is one step of three. the first cleans the statistics data, the second generates the new data and the third is the one which generates the mails.

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Arthur Erdös
> Arthur Erdös wrote: > > ok, its not really fast, but it runs on my development machine (AMD64, 4 > > GB of RAM, Ubuntu). mysql on the same machine, database with 175 tables > > and 2,3 GB data. that could probably slow down scripts, don't you agree? > > no. you

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Arthur Erdös
> don't OMFG me - I can't read your cmdline from here you know, > and I'm not the one with a completely borked script/system/whatever. > a big sorry again for the missunderstanding!! ;) I did not omfg YOU! I did omfg ME when I saw that the script eats much more memory as memory_get_usage() return

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Arthur Erdös
ok, its not really fast, but it runs on my development machine (AMD64, 4 GB of RAM, Ubuntu). mysql on the same machine, database with 175 tables and 2,3 GB data. that could probably slow down scripts, don't you agree? > On Thu, 2007-04-12 at 17:59 +0200, Arthur Erdös wrote: > > &

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Arthur Erdös
> int memory_get_usage ( [bool $real_usage] ) > > Returns the amount of memory, in bytes, that's currently being allocated to > your PHP script. > > it returns the number of *bytes* !!! sure, and memory_get_usage()/1048576 returns the number of megs, or am i wrong? o_O > > > > >> exactly how

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Arthur Erdös
hihi, sorry for that! The Ads come from our Ad-Seller (or how is this called in english) and we have nearly no influence on what kind of ads are delivered ;) Am Donnerstag, den 12.04.2007, 16:18 +0200 schrieb Jochem Maas: > [EMAIL PROTECTED] wrote: > > Couple of questions come to mind... > > >

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Arthur Erdös
answering Jochem: > WTF - 386 megs for an html file??? somehow I doubt this is > the correct number ... are you reading the memory consumption > correctly? when the newsletter generation starts memory_get_usage() says ~96 MB in use. So approx 290 megs more are used after reading the 20.7 Kb tem

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Arthur Erdös
values within a loop. The size of the used memory grows permanently in each loop by approx 30 MB (100 newsletters are generated per loop). any ideas what i am doing wrong and where i [ab]use php? ^^ > Arthur Erdös wrote: > > Hello all, > > > > is there a way to fre

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Arthur Erdös
customized values within a loop. The size of the used memory grows permanently in each loop by approx 30 MB (100 newsletters are generated per loop). any ideas what i am doing wrong and where i [ab]use php? ^^ Jochem Maas schrieb: Arthur Erdös wrote: Hello all, is there a way to free memory allocated

Re: [PHP] free allocated memory: HOW ?

2007-04-12 Thread Arthur Erdös
n the placeholders in the read template are replaced by customized values within a loop. The size of the used memory grows permanently in each loop by approx 30 MB. any ideas what i am doing wrong and where i [ab]use php? ^^ Jochem Maas schrieb: Arthur Erdös wrote: Hello all, is there a way to

[PHP] free allocated memory: HOW ?

2007-04-12 Thread Arthur Erdös
Hello all, is there a way to free memory allocated by variables in PHP?? This is a very important issue concerning long running scripts... I have a script that generates > 5000 Newsletters and when the script finishes it uses 1.8 GB (!!) of RAM. Although I am using unset() to clean up variab