470,862 Members | 1,809 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,862 developers. It's quick & easy.

Memory leak, what does it mean?

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
2 2891
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
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.

Similar topics

32 posts views Thread by John | last post: by
10 posts views Thread by s.subbarayan | last post: by
8 posts views Thread by ranjeet.gupta | last post: by
23 posts views Thread by James | last post: by
8 posts views Thread by Adrian | last post: by
7 posts views Thread by Salvador | last post: by
16 posts views Thread by KG | last post: by
18 posts views Thread by Daniel Orner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.