>That means if I do kmalloc in a module and unload the module without kfree
then that memory is lost and kernel wont be able to use that >memory in
future. Right?

Oops! Apologies for repeating the question.
Yeah people already have said yes for this question in this thread.

Thanks

On 1/24/08, sahlot arvind <[EMAIL PROTECTED]> wrote:
>
> >And, memory allocated by pages are considered "kernel memory". So
> >unless you mark them somehow, there is no difference between the ones
> >allocated by module, syscall and so on.
>
> Makes sense!
> That means if I do kmalloc in a module and unload the module without kfree
> then that memory is lost and kernel wont be able to use that memory in
> future. Right?
>
>
>  On 1/24/08, Mulyadi Santosa <[EMAIL PROTECTED]> wrote:
> >
> > Hi...
> > On Jan 24, 2008 1:32 PM, sahlot arvind <[EMAIL PROTECTED] > wrote:
> > > Thanks to all for their resonse!
> > >
> > > Ok, just one thing -
> > > When I do lsmod -
> > > it shows the memory used by loaded LKMs. So if there is a leak in LKM1
> > then
> > > after executing the function (which is doing kmalloc but forgetting to
> > do
> > > kfree) of LKM1, lsmod should report an increased memory usage by LKM1.
> > Am I
> > > right?
> >
> > I doubt it. I guess lsmod just show initialized+text size section, not
> > allocated pages during runtime of the module.
> >
> > And, memory allocated by pages are considered "kernel memory". So
> > unless you mark them somehow, there is no difference between the ones
> > allocated by module, syscall and so on.
> >
> > regards,
> >
> > Mulyadi.
> >
>
>

Reply via email to