By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,017 Members | 1,169 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,017 IT Pros & Developers. It's quick & easy.

Memory leak, what does it mean?

P: n/a
What does this me?

/usr/ports/lang/php5-cli/work/php-5.0.5/main/streams/streams.c(1209) : Freeing
0x083AC564 (1 bytes), script=/home/webmaster/allphp/main.php
/usr/ports/lang/php5-cli/work/php-5.0.5/ext/standard/file.c(472) : Actual locati
on (location was relayed)
Last leak repeated 5 times
=== Total 6 memory leaks detected ===

Is it my script or is it php? The script output appears
correct. Should I do something?

--
Lars Eighner us****@larseighner.com http://www.larseighner.com/
It's important for us to explain to our nation that life is important. It's
not only life of babies, but it's life of children living in, you know, the
dark dungeons of the Internet.--G.W. Bush, Arlington Heights, Ill.,10/24/00
Feb 10 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Lars Eighner wrote:
What does this me?

/usr/ports/lang/php5-cli/work/php-5.0.5/main/streams/streams.c(1209) :
Freeing 0x083AC564 (1 bytes), script=/home/webmaster/allphp/main.php
/usr/ports/lang/php5-cli/work/php-5.0.5/ext/standard/file.c(472) : Actual
locati on (location was relayed)
Last leak repeated 5 times
=== Total 6 memory leaks detected ===

Is it my script or is it php? The script output appears
correct. Should I do something?


Hi,

A memoryleak means something like this:
(Mostly coded in C, and in very simple terms)
1) A process wants some bytes to store information (for example a variable)
and asks the kernel to allocate them on behalf of that process.

2) Process does its thing, probably using that just allocated memoryspace.

3) Because of some unexpected behaviour or a plain bug the process ends
without telling the kernel to free the memory it allocated for the process.
(under normal circumstances the process WILL tell the kernel to free the
memory.)

4) Memory will be allocated to a process that is gone. So no other process
can use that memory, hence the name memoryleak.

What you should do about it?
I would report it at http://bugs.php.net/
It is probably way too complex for yourself to fix.

Be sure you give them a detailed report, possibly with an example where it
happens.
You are helping the development of PHP a lot by filing bugs!

Regards,
Erwin Moller
Feb 10 '06 #2

P: n/a
On 2006-02-10, Erwin Moller <si******************************************@spam yourself.com> wrote:
A memoryleak means something like this:
(Mostly coded in C, and in very simple terms)
1) A process wants some bytes to store information (for example a variable)
and asks the kernel to allocate them on behalf of that process.
Actually it asks a function in the runtime library, eg. /usr/lib/libc.*.so or
c:/windows/system/msvcrt*.dll
2) Process does its thing, probably using that just allocated memoryspace.

3) Because of some unexpected behaviour or a plain bug the process ends
without telling the kernel to free the memory it allocated for the process.
(under normal circumstances the process WILL tell the kernel to free the
memory.)

4) Memory will be allocated to a process that is gone. So no other process
can use that memory, hence the name memoryleak.
Actually the OS kernal will free the memory on most systems, but as you say
the leak indicates a malfunction that may have worse conseqqquences.
Be sure you give them a detailed report, possibly with an example where it
happens.
You are helping the development of PHP a lot by filing bugs!


Definately.

Bye.
Jasen
Feb 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.