Re: Smart strings & memory allocation
| From: | Stanislav Malyshev | Date: | Wed, 18 Jun 2003 14:29:43 +0000 |
| Subject: | Re: Smart strings & memory allocation | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-2379@lists.php.net to get a copy of this message | ||
SS>> > This might actually be a very good idea, since it can likely improve
SS>> > performance a lot by having a pool of zval-sized blocks (I have no idea
SS>> > of how big they are). Have you thought about how to implement it in a
SS>> > good way?
SS>>
SS>> Free lists already exist.
Yes, of course.. The problem I percieve might be with freelisting approach
(I am not sure it is the real problem, but I think it might be) that we
can lead to severe fragmentation in common malloc arena, especially when a
large number of threads have a lot of long-lived malloced blocks. On top
of this, freelisted elements still need to be individually allocated -
which can be less efficient than using some kind of fixed-block slab
allocator. Again, I do not yet claim it is indeed so - I just think it
may be a possibility that it is so.
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.109