Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58492 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77912 invoked from network); 2 Mar 2012 14:22:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Mar 2012 14:22:16 -0000 Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; 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:34420] helo=mail-tul01m020-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/63-11220-D87D05F4 for ; Fri, 02 Mar 2012 09:22:12 -0500 Received: by obbwd1 with SMTP id wd1so2204243obb.29 for ; Fri, 02 Mar 2012 06:21:58 -0800 (PST) Received-SPF: pass (google.com: domain of julienpauli@gmail.com designates 10.182.1.40 as permitted sender) client-ip=10.182.1.40; Authentication-Results: mr.google.com; spf=pass (google.com: domain of julienpauli@gmail.com designates 10.182.1.40 as permitted sender) smtp.mail=julienpauli@gmail.com; dkim=pass header.i=julienpauli@gmail.com Received: from mr.google.com ([10.182.1.40]) by 10.182.1.40 with SMTP id 8mr4112340obj.30.1330698118293 (num_hops = 1); Fri, 02 Mar 2012 06:21:58 -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=Afvh5C1gxzQRXiNlqZ9dP7LCVjkC3NlAC0A2L0uGqS8=; b=w4tMJaYwfaZbYmjK3MxFs4UQBW+8352I91ujnoWqclLWTIA4jMPqzMR/333lByhREx OW4+8Qy4yH7+9TiKm27Wi6N1jIobMtJyDGGDkLOZF7y6nePfj9CDnEY1NlK0qbbKMWiz BsyjBtsoaBXlRCGMwluyDwMRPtsTt9DmHZbTo+wqqr4asv9gyG+iPGxMmSXHFceFXLXR joy8G56Exttdgu7x/JFJDvLEd/2sYBn0R0wDGjG3TOSBA7ylMso+LjHVyH97HeP6Q5KZ 7UqJ92Toc8ZmZCpxQTUaV8RHZNj8AfERIFBrZDAEmkHJ1yv6CKtQDa3HZvJoZanUYab/ 7XEg== Received: by 10.182.1.40 with SMTP id 8mr3541415obj.30.1330698118220; Fri, 02 Mar 2012 06:21:58 -0800 (PST) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.182.69.138 with HTTP; Fri, 2 Mar 2012 06:21:18 -0800 (PST) In-Reply-To: <1330696670.9280.YahooMailNeo@web43504.mail.sp1.yahoo.com> References: <1330692703.90971.YahooMailNeo@web43509.mail.sp1.yahoo.com> <1330696670.9280.YahooMailNeo@web43504.mail.sp1.yahoo.com> Date: Fri, 2 Mar 2012 15:21:18 +0100 X-Google-Sender-Auth: hhQMtAxa8AxBd05Cc2_F0frIfkA Message-ID: To: Adi Mutu Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=f46d04463132a3ca6a04ba434c9e Subject: Re: [PHP-DEV] ZEND_MM_SMALL_FREE_BUCKET and ZEND_MM_REST_BUCKET From: jpauli@php.net (jpauli) --f46d04463132a3ca6a04ba434c9e Content-Type: text/plain; charset=ISO-8859-1 On Fri, Mar 2, 2012 at 2:57 PM, Adi Mutu 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 > To: Adi Mutu > Cc: "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 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)) > --f46d04463132a3ca6a04ba434c9e--