Query regarding dma_alloc()
RKK
kulkarni.ravi4 at gmail.com
Fri Jul 29 06:40:35 EDT 2011
> Hi all,
> What is the difference between the following memory allocations.
>
> 1) Memory allocation by doing,
> char *buf;
> buf = kmalloc(BUF_LEN, GFP_DMA | GFP_KERNEL);
>
> 2) And by
> char *buf;
> buf = dma_alloc(...);
>
> in the link http://www.arm.linux.org.uk/developer/memory.txt
> it says that dma_alloc() returns virtual address in "ffc00000-----fffeffff"
> this region,
>
> while in the first case it is returning Virtual address in "low-memory"
> region.
>
> For DMA mappable memory which one we should use..?
>
Hi Sandeep
Please have a look at these two API;s below.
http://lxr.linux.no/#linux+v3.0/Documentation/DMA-API-HOWTO.txt
http://lxr.linux.no/#linux+v3.0/Documentation/DMA-API.txt
--
Warm Regards,
Ravi Kulkarni
More information about the Kernelnewbies
mailing list