Limiting program RAM addresses

Mohammed Khoory mkhoory at eiast.ae
Fri Nov 29 08:39:27 UTC 2013


Hi,

My LEON3 board provides 8 megabytes of RAM, located between 0x40000000 and
0x40800000. I've registered a ramdisk driver to use the range between
0x40200000 - 0x40800000. I presumed that by registering the ramdisk, RTEMS
would make sure that nothing gets written there except as part of the
ramdisk. I realized however that heap operations such as malloc, and maybe
even the stack, were writing into the ramdisk area, and so it was corrupting
my filesystem.

Is there any possible way to limit the entire program memory so that it only
goes between 0x40000000  - 0x40200000? i.e. I would like to make sure that
the RTEMS workspace, stack and heap are all within this area of RAM. I was
looking in linkcmds  for this kind of option, and I found the _RAM_START and
_RAM_SIZE definitions in linkcmds. I tried modifying them to suit my needs,
but it seems like nothing has changed. Is there something else I need to
change as well?

Thanks,
Mohammed Khoory




More information about the users mailing list