Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - How to malloc a continue physical space and get its address: (3 Items)
   
How to malloc a continue physical space and get its address  
In my dma application,I should get a physical continue memory(1MBytes),and must get it's Physical address as dma's 
source address.

the function of "malloc" can only get the memory, without the physical address.

What should I do can get the memory and it's address.

Thanks!
RE: How to malloc a continue physical space and get its address  
Check the mmap and mem_offset API.


-----Original Message-----
From: wang hao [mailto:community-noreply@qnx.com] 
Sent: Monday, May 12, 2014 6:35 AM
To: ostech-core_os
Subject: How to malloc a continue physical space and get its address

In my dma application,I should get a physical continue memory(1MBytes),and must get it's Physical address as dma's 
source address.

the function of "malloc" can only get the memory, without the physical address.

What should I do can get the memory and it's address.

Thanks!




_______________________________________________

OSTech
http://community.qnx.com/sf/go/post110264
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
RE: How to malloc a continue physical space and get its address  

> -----Message d'origine-----
> De : wang hao [mailto:community-noreply@qnx.com]
> Envoyé : 12 mai 2014 06:35
> À : ostech-core_os
> Objet : How to malloc a continue physical space and get its address
> 
> In my dma application,I should get a physical continue memory(1MBytes),and
> must get it's Physical address as dma's source address.
> 
> the function of "malloc" can only get the memory, without the physical
> address.
> 
> What should I do can get the memory and it's address.

Check out mmap() and mmap_offset()

> 
> Thanks!
> 
> 
> 
> 
> _______________________________________________
> 
> OSTech
> http://community.qnx.com/sf/go/post110264
> To cancel your subscription to this discussion, please e-mail ostech-core_os-
> unsubscribe@community.qnx.com