Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58484 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62404 invoked from network); 2 Mar 2012 13:44:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Mar 2012 13:44:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-tul01m020-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:41916] helo=mail-tul01m020-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 67/40-11220-EBEC05F4 for ; Fri, 02 Mar 2012 08:44:32 -0500 Received: by obbwd1 with SMTP id wd1so2163500obb.29 for ; Fri, 02 Mar 2012 05:44:27 -0800 (PST) Received-SPF: pass (google.com: domain of julienpauli@gmail.com designates 10.182.41.6 as permitted sender) client-ip=10.182.41.6; Authentication-Results: mr.google.com; spf=pass (google.com: domain of julienpauli@gmail.com designates 10.182.41.6 as permitted sender) smtp.mail=julienpauli@gmail.com; dkim=pass header.i=julienpauli@gmail.com Received: from mr.google.com ([10.182.41.6]) by 10.182.41.6 with SMTP id b6mr4044054obl.10.1330695867346 (num_hops = 1); Fri, 02 Mar 2012 05:44:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=5aMSztXpJ9xuPOJOiXkFXpM3b27ZEAXIkEqCRy/b2ZM=; b=UHM1kdybC2m6+vdTYaGgcVeiGBhJHntMDCKjmILoOAEsD4KjGAAYy6YtA+rxR6RbuV XGFwQ9BAQMOEDJOEefkSKyi0Dg+wXzN27V7bNiEcJFE4OPc3Djk7XW2+mi30g+39lbU/ b/EOfkxCTwNB+NMKBFKK8tfOiW8QxfZHEHIXZrWb8grCAzCAALhiHg6JbztY0FrlfbtB RhvkaMtT1UEc80ChQJtPbCnr+6NDtYgTGkL9tEGUwC0dfD2aEhHMoFzAZ/iyEG8IYHGI u1HMWwhdzV3ny2f3cx7Ki2oEdVXSO8Wp/WA4rxHL0Fkq+mwsRT3HUuyIwOPB9hJbAP0a KT0A== Received: by 10.182.41.6 with SMTP id b6mr3496806obl.10.1330695867283; Fri, 02 Mar 2012 05:44:27 -0800 (PST) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.182.69.138 with HTTP; Fri, 2 Mar 2012 05:43:47 -0800 (PST) In-Reply-To: <1330692703.90971.YahooMailNeo@web43509.mail.sp1.yahoo.com> References: <1330692703.90971.YahooMailNeo@web43509.mail.sp1.yahoo.com> Date: Fri, 2 Mar 2012 14:43:47 +0100 X-Google-Sender-Auth: rZr5S-ZcFIvd6Nr5UkSL1HkUoQM Message-ID: To: Adi Mutu Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=f46d044517a379390904ba42c652 Subject: Re: [PHP-DEV] ZEND_MM_SMALL_FREE_BUCKET and ZEND_MM_REST_BUCKET From: jpauli@php.net (jpauli) --f46d044517a379390904ba42c652 Content-Type: text/plain; charset=ISO-8859-1 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 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)) --f46d044517a379390904ba42c652--