summaryrefslogtreecommitdiff
path: root/Zend/zend_alloc.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2009-08-09 04:46:30 +0000
committerAndi Gutmans <andi@php.net>2009-08-09 04:46:30 +0000
commit4f34f5b0e32e10809553d3c89b093083304b29b4 (patch)
tree96b7f60fe90b44cad58b8ff84ecdc61daa0f0a4c /Zend/zend_alloc.c
parent53349c7769c2100d0c23d3fe444de33039d97166 (diff)
downloadphp-git-4f34f5b0e32e10809553d3c89b093083304b29b4.tar.gz
- MFH
Diffstat (limited to 'Zend/zend_alloc.c')
-rw-r--r--Zend/zend_alloc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 22963d87b3..a6abbba650 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -709,12 +709,14 @@ static inline unsigned int zend_mm_low_bit(size_t _size)
unsigned int n;
unsigned int index = 0;
- do {
- n = offset[_size & 15];
+ n = offset[_size & 15];
+ while (n == 4) {
_size >>= 4;
index += n;
- } while (n == 4);
- return index;
+ n = offset[_size & 15];
+ }
+
+ return index + n;
#endif
}