Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jun 2001 00:12:04 +1000 (EST)
From:      Rowan Crowe <rowan@sensation.net.au>
To:        freebsd-isp@freebsd.org
Subject:   [slightly OT] standalone PHP memory consumed
Message-ID:  <Pine.BSF.4.21.0106240004550.74441-100000@velvet.sensation.net.au>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0106240004550.74441-100000>