contiguous physical memory allocation

Camilo Alejandro Arboleda CamiloAlejo at netscape.net
Wed Mar 5 13:52:11 UTC 2003



Salman wrote:

>>>hi guys,
>>>
>>>i'm looking for a function in rtems which allocates contiguous physical
>>>memory (somewhat similar to memalign in vxworks)
>>>
>>>      
>>>
>>As far as I known, RTEMS uses a flat memory model. It means the physical 
>>address is the same logical address and malloc should allocate 
>>contiguous physical memory.
>>
>>    
>>
>
>One other thing though, I need to have the allocated buffer aligned as
>well (so that it begins on a memory address evenly divisible by 8192),
>any idea on how to achieve this?
>
>thanks for the response,
>
>Salman
>  
>
In that case you do need the partition manager (may be the region 
manager, Joel explained me the difference some time ago, but I don't 
remember now). You need to do a couple of things:
- Patch your BSP for not allocating the free memory as heap for use of 
malloc.
- Allocate a partition in a known memory area and create it with 8k blocks.

Camilo A.
-- 
Your favorite stores, helpful shopping tools and great gift ideas. 
Experience the convenience of buying online with Shop at Netscape! 
http://shopnow.netscape.com/





More information about the users mailing list