From owner-freebsd-isp Sat Jun 23 7:12:15 2001 Delivered-To: freebsd-isp@freebsd.org Received: from velvet.sensation.net.au (serial1-2-velvet-brunswick.sensation.net.au [203.20.114.195]) by hub.freebsd.org (Postfix) with ESMTP id A453C37B40B for ; Sat, 23 Jun 2001 07:12:11 -0700 (PDT) (envelope-from rowan@sensation.net.au) Received: from localhost (rowan@localhost) by velvet.sensation.net.au (8.9.3/8.9.3) with ESMTP id AAA74473 for ; Sun, 24 Jun 2001 00:12:05 +1000 (EST) (envelope-from rowan@sensation.net.au) X-Authentication-Warning: velvet.sensation.net.au: rowan owned process doing -bs Date: Sun, 24 Jun 2001 00:12:04 +1000 (EST) From: Rowan Crowe To: freebsd-isp@freebsd.org Subject: [slightly OT] standalone PHP memory consumed Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hello, Just wondering if anyone else here has noticed that the standalone PHP (ie minus the "--with-apache" option) seems to eat more and more memory? I have a slightly unusual application that parses several web pages and pulls out image and href URLs; when I start it, the process size is just over 2Mb. As the script crunches the process size continues to grow, often past 100Mb. I'm not sure if it's a memory leak bug, or a fundamental limitation of the way the interpreter works. For example: function somefunction { $t = "hello"; return $t; // does $t get freed here? } $variable = somefunction(); In this case is a *copy* of $t returned and $t freed, OR is the reference/address of $t returned and it's never freed? I might do some testing to see if I can figure it out.... This is the only reason I can think of this behaviour, there is nothing in my script that could eat up 100Mb of memory by itself. As always, any pointers appreciated. :) Cheers. -- Rowan Crowe http://www.rowan.sensation.net.au/ Sensation Internet Services http://info.sensation.net.au/ Melbourne, Australia Phone: +61-3-9329-5498 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message