Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51799 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97836 invoked from network); 3 Apr 2011 10:47:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Apr 2011 10:47:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:37829] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 20/E2-52504-620589D4 for ; Sun, 03 Apr 2011 06:47:02 -0400 Received: by fxm1 with SMTP id 1so3758457fxm.29 for ; Sun, 03 Apr 2011 03:46:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=iVTlUFBnq3FJjkiPx9KSo47Bw/2d7QL2OPQ58l8JXsI=; b=u6qgRuhPm2/3yqSYfb0uMyDQBb7QiOQqezItl6tLCM9M4lyvzuvshGLa3RwMduIH+G CxP4yk5C58RSf10GuFOZMVmRCZjvhPLtIES0ax0o6EbWi80xqU+sJ9ILluIlrCTmXaSU L5aWoQe0QOkMQlDMBXssl6UKlQAMiU0yEI4Sw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=D7bWrOjfHCkzKcOYn3X420zG6KXKRF4ZsxjJh+lgOTDRnzw8bXgVShYNCkyCvoj0St gEWYFZ/Y5ji2rW9XBkGusj+ZDsar0g9a0Zl1lvQBHRODFXDeMPbG0FukevTGiasPnrxu cKJ5dOVEOOrUhW/y/iKNvjmSYOoxAkCoMeknI= MIME-Version: 1.0 Received: by 10.223.59.81 with SMTP id k17mr3149870fah.94.1301827619503; Sun, 03 Apr 2011 03:46:59 -0700 (PDT) Received: by 10.223.74.203 with HTTP; Sun, 3 Apr 2011 03:46:59 -0700 (PDT) In-Reply-To: <4D9849EA.9010805@nouvo.com> References: <4D95B6AB.30608@templeet.org> <4D960169.3000400@templeet.org> <4D9849EA.9010805@nouvo.com> Date: Sun, 3 Apr 2011 12:46:59 +0200 Message-ID: To: Pascal COURTOIS Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] how to find a memory corruption in php ? From: pierre.php@gmail.com (Pierre Joye) On Sun, Apr 3, 2011 at 12:20 PM, Pascal COURTOIS wrote: > Le 01/04/2011 18:46, Pascal COURTOIS a =E9crit : >> Le 01/04/2011 15:20, Pierre Joye a =E9crit : >>> hi, >>> >>> In php 5.3+ the memory limit default is 256MB, not 128MB. 5.3 does not >>> necessary use more memory but actually uses and reports its usage more >>> efficiently. I would suggest to use this default value and try again. >> >> =A0 the exact same bug occurs whatever the limit set. Anyway, when it wo= rks >> it's ok with 6MB so it's not a matter of quantity obviously. > > further investigations show that my program uses around 3Mbytes of memory= BUT > real_usage memory increases constantly which could suggest either a bug i= n the > zend memory manager or a very special condition in my php program making = the > memory manager unable to use holes in its system allocated memory. > > the use of gc_collect_cycles() as suggested privately does not make any d= ifference. Try to run it by disabling the zend memory manager: USE_ZEND_ALLOC=3D0 valgrind php --leak-check=3Dfull sapi/cli/php ... (or httpd if you use apache or only reproducible there) That will tell you if there are actual leaks. See Zend/README.ZEND_MM for more details Cheers, --=20 Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org