On Fri, Mar 2, 2012 at 2:57 PM, Adi Mutu <adi_mut...@yahoo.com> wrote:
> > > Thanks Julien, > > but i've already read your article using translator and did not found an > answer to that (i've also sent you an email about Zend mm a few days ago) > Not seen that. Anyway, I dont master all ZendMM stuff, I couldn't explain every line of code. It's been mainly designed back in 2005, I wasn't here yet :) It's not very hard to guess what it does, if you know how a memory manager works. Basically, it does stuff that malloc() does internally, stuff explained here, for example ( http://www.phrack.org/issues.html?issue=57&id=9#article) ; but for PHP needs, and with multi-platform in mind. Julien.P > laurence site looks down to me. Perhaps the link is wrong? > > Thanks, > A. > > > ________________________________ > From: jpauli <jpa...@php.net> > To: Adi Mutu <adi_mut...@yahoo.com> > Cc: "internals@lists.php.net" <internals@lists.php.net> > Sent: Friday, March 2, 2012 3:43 PM > Subject: Re: [PHP-DEV] ZEND_MM_SMALL_FREE_BUCKET and ZEND_MM_REST_BUCKET > > Laruence and I wrote articles about ZendMM internals. > > You would find them at http://www.laruence.com/2011/11/09/2277.html and > > http://julien-pauli.developpez.com/tutoriels/php/internals/zend-memory-manager/ > . > You can use any translator to get them in English > > For basic use, see the readme at > http://lxr.php.net/xref/PHP_5_4/Zend/README.ZEND_MM > > Hope this helps :) > > Julien.P > > On Fri, Mar 2, 2012 at 1:51 PM, Adi Mutu <adi_mut...@yahoo.com> wrote: > > > > > > > Hello, > > > > Can somebody shed some light on these 2 defines? Thanks. > > > > > > #define ZEND_MM_SMALL_FREE_BUCKET(heap, index) \ (zend_mm_free_block*) > > ((char*)&heap->free_buckets[index * 2] + \ > sizeof(zend_mm_free_block*) > > * 2 - \ sizeof(zend_mm_small_free_block)) #define > > ZEND_MM_REST_BUCKET(heap) \ > > (zend_mm_free_block*)((char*)&heap->rest_buckets[0] + \ > > sizeof(zend_mm_free_block*) * 2 - \ > sizeof(zend_mm_small_free_block)) >