<div dir="ltr"><div><div>Please use make menuconfig and press / then search for DEBUG_KMEMLEAK_EARLY_LOG_SIZE and adjust value then save and exit.<br></div><br></div>You will find it under Kernel Hacking -> Memory Debugging -|> Kernel memory leak detector<div>
<br>Symbol: DEBUG_KMEMLEAK_EARLY_LOG_SIZE [=] <br> │ Type : integer <br>
│ Prompt: Maximum kmemleak early log entries <br> │ Location: <br>
│ -> Kernel hacking <br> │ -> Memory Debugging <br>
│ (3) -> Kernel memory leak detector (DEBUG_KMEMLEAK [=n]) <br> │ Defined at lib/Kconfig.debug:459 <br>
│ Depends on: DEBUG_KMEMLEAK [=n] <br><div class="gmail_extra"><br><br><br><br><br><div class="gmail_quote">On Thu, Mar 13, 2014 at 1:39 PM, m silverstri <span dir="ltr"><<a href="mailto:michael.j.silverstri@gmail.com" target="_blank">michael.j.silverstri@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks Sankar.<br>
<br>
If I just modify .config file to enable CONFIG_DEBUG_KMEMLEAK, how can<br>
I 'Increase the config option "Maximum kmemleak early log entires"<br>
value to a sufficiently large number like 1200. The default value of<br>
400 may not work correctly in all configurations.'?<br>
<div class=""><div class="h5"><br>
On Thu, Mar 13, 2014 at 9:34 AM, Sankar P <<a href="mailto:sankar.curiosity@gmail.com">sankar.curiosity@gmail.com</a>> wrote:<br>
> 2014-03-10 10:44 GMT+05:30 m silverstri <<a href="mailto:michael.j.silverstri@gmail.com">michael.j.silverstri@gmail.com</a>>:<br>
>> Hi,<br>
>><br>
>> I am developing a kernel driver. What should I test to make sure my<br>
>> kernel driver is not leaking memory?<br>
>> 1. under normal operation (when applications open and close my driver properly)<br>
>> 2. in error situation (when application open my driver and then it<br>
>> crashes without close my driver property)<br>
>><br>
>> How can I find out the memory usage used by my driver? so that I can<br>
>> monitor it over time.<br>
>><br>
><br>
> I have earlier come across a similar situation and kmemleak was very helpful.<br>
><br>
> I documented my steps and you may find it useful:<br>
><br>
> <a href="http://psankar.blogspot.in/2010/11/detecting-memory-leaks-in-kernel.html" target="_blank">http://psankar.blogspot.in/2010/11/detecting-memory-leaks-in-kernel.html</a><br>
><br>
><br>
> --<br>
> Sankar P<br>
> <a href="http://psankar.blogspot.com" target="_blank">http://psankar.blogspot.com</a><br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</div></div></blockquote></div><br></div></div></div>