Re: ZEND_MM_SMALL_FREE_BUCKET and ZEND_MM_REST_BUCKET

From: Date: Fri, 02 Mar 2012 14:41:23 +0000
Subject: Re: ZEND_MM_SMALL_FREE_BUCKET and ZEND_MM_REST_BUCKET
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Fri, Mar 2, 2012 at 8:51 PM, Adi Mutu <[email protected]> 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))

Hi:

the first MACRO is a tricky way to put a number of ZEND_NUM_BUCKETS
zend_mm_buckects into a fixed length array.

and yes, my site might be blocked by chinese GFW, but you can try
this: https://wiki.php.net/internals/zend_mm

plz see the red part of the first picture..

thanks



-- 
Laruence  Xinchen Hui
http://www.laruence.com/


Thread (12 messages)

« previous php.internals (#58493) next »