|
Posted by Jasen Betts on 02/11/06 01:41
On 2006-02-10, Erwin Moller <since_humans_read_this_I_am_spammed_too_much@spamyourself.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
Navigation:
[Reply to this message]
|