Re: Out of memory vs memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 7, 2010 at 8:34 PM, Anand Raj Manickam <anandrm@xxxxxxxxx> wrote:
> I have a few doubts regarding Out of Memory  .
>
> 1.Does memory leak in the kernel always lead to OOM ?
>
> 2. I wrote a kernel  test module testing the memory leak , which on
> exit kmallocs
>
> exit_module ()
> {
>   while(1)
>   kmalloc((8*1024),GFP_KERNEL);
> }
>
> so when i rmmod test , the kernel never panicked on OOM , but it
> panicked on the page allocation stat (sorry for not attaching the
> dump)
> Does the kernel differentiate between a Memory Leak and a Out of
> memory situation ?

You don't panic immediately. Memory leaks eventually leads to out of
memory because the memory manager has given all the memory to someone
and hasn't got back (leaked !!). So if a new requestor comes he
doesn't have anything to allocate and you get out of memory.

Thanks -
Manish

>
> Google didnt help me in the releation between memory leak and OOM .
>
> Thanks,
> Anand
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>



-- 
Thanks -
Manish
==================================
[$\*.^ -- I miss being one of them
==================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux