contiguous physical memory allocation

gregory.menke at gsfc.nasa.gov gregory.menke at gsfc.nasa.gov
Wed Mar 5 14:09:45 UTC 2003


Salman writes:
 > > >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,

Is there any particular reason why you can't just use malloc() and
round up?  RTEMS, like vxWorks uses a flat memory model anyhow, so
malloc memory will be contiguous.

Gregm




More information about the users mailing list