Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58520 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73288 invoked from network); 2 Mar 2012 19:10:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Mar 2012 19:10:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=adi_mutu06@yahoo.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=adi_mutu06@yahoo.com; sender-id=unknown; domainkeys=good Received-SPF: error (pb1.pair.com: domain yahoo.com from 98.139.91.75 cause and error) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: adi_mutu06@yahoo.com X-Host-Fingerprint: 98.139.91.75 nm5.bullet.mail.sp2.yahoo.com Received: from [98.139.91.75] ([98.139.91.75:21136] helo=nm5.bullet.mail.sp2.yahoo.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 75/AA-22821-21B115F4 for ; Fri, 02 Mar 2012 14:10:11 -0500 Received: from [98.139.91.69] by nm5.bullet.mail.sp2.yahoo.com with NNFMP; 02 Mar 2012 19:10:08 -0000 Received: from [72.30.22.33] by tm9.bullet.mail.sp2.yahoo.com with NNFMP; 02 Mar 2012 19:10:07 -0000 Received: from [127.0.0.1] by omp1061.mail.sp2.yahoo.com with NNFMP; 02 Mar 2012 19:10:07 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 577158.9196.bm@omp1061.mail.sp2.yahoo.com Received: (qmail 99655 invoked by uid 60001); 2 Mar 2012 19:10:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1330715407; bh=RYVbiJVY5BzZFVEvcD1AcAVuE9ISTJhb2RyqqmSOg4o=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=CJUuB+STtZmhBdXSTGTQnWn/FcOi4E3ENfRXMWIcfTMY1Q7AJgbf1qNhaURLXNsha5cSgFAYyfLqbF1QdevG54Bg96OGITJ6qXB3R+2owwMmXzXioVCxUAh3pGgL9/0PI36sem/E+CNAe8Y/AUE6+MajzEydMDNTx04xzQ5uaog= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=Ga1jTMw9aQlS4CQQeitv14ZsaoGmS92AlD4gSMHOJYmFNHYBaOLSsdPtwuQ08SrOSoWXtuLVjCYw+fP9CCMmSyj/NvCHM/4BwgPU9IlPhYBebMvhAA2kF97BOT7bKrp/zK63/B561TSHFFLr+xsNILIbfWA7XDHROkGjXd1NPK0=; X-YMail-OSG: gc52V0AVM1nwnxSKYPhsGBZzscFCPurDm7rXbPMTVQEEtIz dCuZcuIdDeXcI1ojbnNp14i7j08oiIfbRZ0SjL3vdJrW5HneAKvwii0jfVur lHBY4NYPFDFtqplNQ9koWfjGT3KxhSS7nzmxnu0DJee8H_42H4Bp1jZ80Lss cMYNbgU.MSlau6wpcLHnlCXy6CEzPI8Akd8sYT_QtUhJmPT3z3BeDNzEi_0Q znctNTQN8SpdNo5uSrJ1JvRN59qF4s4PtvHU_dDFmsy4E9eD_9CtGcyDXZMW dDN7HnB9qDzT7jtoGaUOtPlZrvRwZxEyqZpbQf.LsIkJiKnTy00UjeR5BrBM qzWzuOyM7bxaheq6zc4Wblwe62qCulhywM8K8L01xTLwT9wcryoigHTE256k 0eswXi_rvdSN0JSgWKHKU4yfYWNS38LwO8p5e7XmKbTTiE5.Ij29yFC2G_tY HxVcqpUE.JjDUiTqmwrDj3XomP2MO3PiPgtsurwrndhNvUlU8WYf6cvlxnyd E1_a1kZiIbfo7AHl_rZinv56fqdv0piZGQHnwtNjiD52BAFW2bdPYitRMWaZ ISA-- Received: from [92.80.10.11] by web43507.mail.sp1.yahoo.com via HTTP; Fri, 02 Mar 2012 11:10:07 PST X-Mailer: YahooMailWebService/0.8.116.338427 References: <1330692703.90971.YahooMailNeo@web43509.mail.sp1.yahoo.com> <4F51151C.5030305@sugarcrm.com> Message-ID: <1330715407.72277.YahooMailNeo@web43507.mail.sp1.yahoo.com> Date: Fri, 2 Mar 2012 11:10:07 -0800 (PST) Reply-To: Adi Mutu To: Stas Malyshev Cc: "internals@lists.php.net" In-Reply-To: <4F51151C.5030305@sugarcrm.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="686268854-514408655-1330715407=:72277" Subject: Re: [PHP-DEV] ZEND_MM_SMALL_FREE_BUCKET and ZEND_MM_REST_BUCKET From: adi_mutu06@yahoo.com (Adi Mutu) --686268854-514408655-1330715407=:72277 Content-Type: text/plain; charset=us-ascii I think that caching part you're talking about is in function zend_mm_alloc_int......i don't see what caching has to do with these macros... but i maybe mistaking of course. What i don't understand is those additions and substracting in those macros......but i'll read more tomorrow. ________________________________ From: Stas Malyshev To: Adi Mutu Cc: "internals@lists.php.net" Sent: Friday, March 2, 2012 8:44 PM Subject: Re: [PHP-DEV] ZEND_MM_SMALL_FREE_BUCKET and ZEND_MM_REST_BUCKET Hi! > > #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)) IIRC the purpose of these defines is that the MM caches small free blocks so that it could find them faster, so that for example allocating zvals (frequent case) goes faster. So it has a small cache for such blocks, by size, so the allocator can for example quickly find a free block of size of zval or of size of Hashtable. These macros try to find such free block for given small size (first one) or for the rest of blocks (i.e. bigger blocks which share one free list). -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php --686268854-514408655-1330715407=:72277--