[wp-trac] Re: [WordPress Trac] #3141: explicit memory check before starting install

WordPress Trac wp-trac at lists.automattic.com
Mon Dec 31 00:09:07 GMT 2007


#3141: explicit memory check before starting install
-------------------------------------+--------------------------------------
 Reporter:  looksaus                 |        Owner:  ffemtcj 
     Type:  defect                   |       Status:  assigned
 Priority:  normal                   |    Milestone:  2.4     
Component:  Administration           |      Version:  2.1     
 Severity:  normal                   |   Resolution:          
 Keywords:  has-patch needs-testing  |  
-------------------------------------+--------------------------------------
Comment (by darkdragon):

 I was referring to your current patch and not to the code snippet. The
 code snippet is okay, as long as it is further down the execution path and
 raises it dynamically to no more than double the current memory limit.

 I'm saying that you should always check to the current memory limit to
 make sure that you never decrease the memory limit.

 If you put the code snippet at the beginning, it would again lower my
 memory limit to 32, since when !WordPress first starts, it does not use 32
 MB, therefore your code block will run, when it should not on my system.

 memory_get_usage() gets the current process usage at that given time it
 was called. Not what the current limit is. Also, as an aside, you won't be
 able to use memory get_usage() since you have to support PHP 4.2.0 and
 memory_get_usage() was added in PHP 4.3.2.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/3141#comment:26>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list