473,395 Members | 2,783 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 3014
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mark D. Anderson | last post by:
About a month ago Richard Cornford did an interesting analysis of a memory leak in jscript (internet explorer) when there are "circular" references between DOM objects and (real) jscript objects:...
6
by: Tom | last post by:
We have a VERY simple .NET C# Form Application, that has about a 23MB Memory Footprint. It starts a window runs a process and does a regular expression. I have done a GC.Collect to make sure that,...
32
by: John | last post by:
Hi all: When I run my code, I find that the memory that the code uses keeps increasing. I have a PC with 2G RAM running Debian linux. The code consumes 1.5G memory by the time it finishes...
10
by: s.subbarayan | last post by:
Dear all, I happen to come across this exciting inspiring article regarding memory leaks in this website: http://www.embedded.com/story/OEG20020222S0026 In this article the author mentions:...
8
by: ranjeet.gupta | last post by:
Dear All Is the Root Cause of the Memory corruption is the Memory leak, ?? suppose If in the code there is Memory leak, Do this may lead to the Memory Corruption while executing the program ? ...
23
by: James | last post by:
The following code will create memory leaks!!! using System; using System.Diagnostics; using System.Data; using System.Data.SqlClient; namespace MemoryLeak
8
by: Adrian | last post by:
Hi I have a JS program that runs localy (under IE6 only) on a PC but it has a memory leak (probably the known MS one!) What applications are there that I could use to look at the memory usage of...
7
by: Salvador | last post by:
Hi, I am using WMI to gather information about different computers (using win2K and win 2K3), checking common classes and also WMI load balance. My application runs every 1 minute and reports...
16
by: KG | last post by:
Hi, I do have a question. int main() { char *p = (char *)malloc(9); strcpy(p,"TajMahal"); p++;
18
by: Daniel Orner | last post by:
Hi all, I've been trying to pin down a memory leak in IE6 for several WEEKS now. I've done my share of googling etc., and know all about common leaks like circular references and closures, but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.