<p dir="ltr"><br>
On 13-Dec-2014 2:27 AM, "PRAJAPATI MEHUL" <<a href="mailto:mehulprajapati2802@gmail.com">mehulprajapati2802@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> -I am currently working on one embedded development board.<br>
> -I have ported 3.0.31 kernel with my personal patches on it.<br>
><br>
> -When I am trying to insert my module, it fails to allocate 4MB memory using kmalloc.<br>
><br>
> -Below is a snapshot of cat /proc/meminfo command of my embedded linux system.<br>
><br>
><br>
><br>
> -According to my understanding, LowFree parameter indicates free memory in kernel space which is around 536MB in this case.<br>
><br>
> -There is a lot free space available in kernel space thenĀ <br>
> why module fails in kmalloc of 4MB ?<br>
></p>
<p dir="ltr">You are asking 4MiB of contiguous memory that to physically contiguous.</p>
<p dir="ltr">In all probability you might want to use vmalloc if you need contiguous but not physically. Better to use alloc_pages to get pages instead but still no guarantees on your order.</p>
<p dir="ltr">Can you tell more about what you are trying to do?<br></p>
<p dir="ltr">> -Also find the attached log messages of dmesg<br>
><br>
> Regards,<br>
> Mehul<br>
><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">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
><br>
</p>