DR>> Just curious, but why a fixed size block allocator?

Because the tests show that significant part of allocations fall in the 
following categories (not in this particular order by frequency):
1. Small memory allocations (below 16 bytes)
2. zval allocations
3. Hashtable allocations
4. Hash bucket allocations

Those four categories in my tests happen to account for up to 40% of 
emalloc calls which end up with malloc call (I didn't trace "raw" 
mallocs, since most of them are either on init stage or are from some 3rd 
party source and aren't common enough). Also, those are (at least 
positions 2-4) the allocs which engine will definitely use, and use them a 
lot. Those blocks sizes are fixed (we are not going to change zval a lot), 
so the allocator which is good on fixed blocks (obviously, iff it's better 
that general-purpose one) might help improving the performance of these 
parts a lot. Again, this is not a proposal, that's merely an idea. 

-- 
Stanislav Malyshev, Zend Products Engineer   
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.109



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

Reply via email to