Hi Dmitry, all,

I was looking through a few parts of the new MM last week (cool, thanks! I will try soon on my Windows XP), and wasn't sure about the function in the subject...

This:

/* higher set bit number (0->0, 1->1, 2->2, 4->3, 8->4, 127->7, 128->8 etc) */
static zend_always_inline int zend_mm_small_size_to_bit(int size)
{
#if defined(__GNUC__)
return (__builtin_clz(size) ^ 0x1f) + 1;

Will never return 0, right? (Against the comment...) That's OK I guess since, for now, it's only called with size >= 8.

But in that case, this can be removed from the non-GCC version:

if (size == 0) return 0;

Shouldn't have just one version able to return 0? :-/ Unless I'm missing something! Let me know...


Thanks,
Matt

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to