Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53172 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71646 invoked from network); 7 Jun 2011 18:26:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jun 2011 18:26:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=mike.vanriel@naenius.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=mike.vanriel@naenius.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain naenius.com designates 83.96.159.14 as permitted sender) X-PHP-List-Original-Sender: mike.vanriel@naenius.com X-Host-Fingerprint: 83.96.159.14 linux35.webawere.nl Linux 2.6 Received: from [83.96.159.14] ([83.96.159.14:59281] helo=linux35.webawere.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 81/44-50253-F6D6EED4 for ; Tue, 07 Jun 2011 14:26:56 -0400 Received: from 212-127-174-68.cable.quicknet.nl ([212.127.174.68] helo=[192.168.1.109]) by linux35.webawere.nl with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1QU0zK-0002GG-DJ; Tue, 07 Jun 2011 20:26:50 +0200 To: David =?ISO-8859-1?Q?Z=FClke?= Cc: Julien Pauli , internals@lists.php.net In-Reply-To: <2B395C3E-A66B-4A0E-8F14-31B1154ECDC9@bitextender.com> References: <73A0E06E-55E0-4C48-B8F8-BCAFA3216892@bitextender.com> <33db85fd3ebaa4f330120da5fa6445e1@naenius.com> <1C32E9BA-4858-4E24-89DA-0F36DFED352B@bitextender.com> <1307468695.2671.7.camel@chronos> <2B395C3E-A66B-4A0E-8F14-31B1154ECDC9@bitextender.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 07 Jun 2011 20:26:50 +0200 Message-ID: <1307471210.2671.13.camel@chronos> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 Content-Transfer-Encoding: quoted-printable X-Antivirus-Scanner: Seems clean. You should still use an Antivirus Scanner Subject: Re: [PHP-DEV] Trying to find out where the memory went From: mike.vanriel@naenius.com (Mike van Riel) Am i then also correct to assume that the output of memory_get_peak_usage is used for determining the memory_limit? Also: after correcting with your new information (zval =3D 114 bytes instead of 68) I still have a rather large offset: 640952+2165950+114+(276697*114)+(276697*3*114)+2165950 =3D 131146798 = =3D 125M (not trying to be picky here; I just don't understand) _If_ my calculations are correct then a zval should be approx 216 bytes (excluding string contents): ((244000000-640952-2165950-2165950) / 4) / 276697 =3D 215.9647B Mike On Tue, 2011-06-07 at 19:50 +0200, David Z=C3=BClke wrote: > memory_get_peak_usage() is the maximum amount of memory used by the VM of= PHP (but not by some extensions for instance) up until the point where tha= t function is called. So the actual memory usage may be even higher IIRC. B= ut yeah, you're basically right. I've explained in another message why it m= ight be so much more than you expected (zval overhead, basically) >=20 > David