[wp-trac] [WordPress Trac] #14889: Memory Comparison Broken / WordPress Memory Limit

WordPress Trac wp-trac at lists.automattic.com
Fri May 27 22:50:20 UTC 2011


#14889: Memory Comparison Broken / WordPress Memory Limit
-----------------------------------------------+---------------------------
 Reporter:  hakre                              |       Owner:
     Type:  defect (bug)                       |      Status:  new
 Priority:  normal                             |   Milestone:  Future
Component:  General                            |  Release
 Severity:  normal                             |     Version:  3.0
 Keywords:  has-patch 3.2-early needs-testing  |  Resolution:
-----------------------------------------------+---------------------------

Comment (by chrisbliss18):

 Updated my chrisbliss18-patch.2.diff file. The update now checks for
 values of memory_limit equal to or less than -1, which allows unlimited
 memory consumption.

 I believe that this is the reason that the original code failed for me. I
 just so happened to change my php.ini file while trying to figure out the
 issue and forgot about the original setting. I verified this by resetting
 memory_limit to "-1" in my php.ini file and activating enough code to
 consume 32M of memory. This would fail while setting to "128M" would not
 fail.

 My code tests for a memory_limit of -1 or less because my testing shows
 that any value of -1 or less (including values with fractional parts) will
 always be unlimited even though the documentation only says that this
 applies to values of -1. Interestingly, a value of -.5 is treated as 512K.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14889#comment:18>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list