Re: BUG : Memory leak in Linux 2.4.2 MIPS SMP kernel

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

 



On Tue, Nov 13, 2001 at 03:36:32PM -0800, Krishna Kondaka wrote:

> extern inline void destroy_context(struct mm_struct *mm)
> {
> #ifdef CONFIG_SMP
>         kfree((void *)mm->context);
> #else
>         /* Nothing to do.  */
> #endif
> }
> 
> And when I tested this I do not see the memory leak any more.

Almost correct, as James already explained you have to check for a
non-null pointer first.  We got a more elegant implementation of
context switching which I'll add to CVS asap; it gets away without
any memory allocation.

  Ralf

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux