Hi,
I'm running an OMAP L138 board with 64MB RAM and I boot the system from an SD-card. I would like to make use of its RAM, DSP, and other components through HPI and ethernet interface for other systems.
For that purpose I use C6RunLib for an ARM server process to handle requests.
I would like to allocate a small portion (e.g. 8MB) of that 64MB OMAP-RAM for the DSP and the rest (as much as possible) with a fixed size for other systems to use. I have two topics I'm interested in.
1.
I don't think I have understood the memory allocation and usage entirely yet. I'm trying to figure out where I have to allocate RAM space to get what I want.
As I understand CMEM reserves 32MB for a (dynamic) heap buffer from the OMAP-RAM. This heap can then be used from the ARM and the DSP - is this correct?
Oddly to me, no matter if CMEM runs or not, output of TOP command remains about the same.
I assume the "temporary filesystems", visible from the output of DF command, occupy RAM
space. I would like to know what effects it would have if I unmount
these or reduce their size.
CMEMK module:
CMEMK module: built on Mar 24 2011 at 23:44:42
Reference Linux version 2.6.33
File /sdk/build/DVSDK_4_02/4_02_00_06/arago-install/arago-tmp/work/da850-omapl
138-evm-none-linux-gnueabi/ti-linuxutils-1_2_26_01_02-r52d/linuxutils_2_26_01_02
/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
allocated heap buffer 0xc5000000 of size 0x2000000
cmemk initialized
DSPLINK Module (1.65.00.02) created on Date: Mar 24 2011 Time: 23:47:38
Memory usage taken from TOP:
Mem: 14444K used, 13520K free, 0K shrd, 2172K buff, 6112K cached
Output from DF:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 735252 590524 107380 85% /
tmpfs 40 0 40 0% /mnt/.splash
none 1024 28 996 3% /dev
/dev/mmcblk0p2 735252 590524 107380 85% /media/mmcblk0p2
/dev/mmcblk0p1 79073 11387 67687 14% /media/mmcblk0p1
tmpfs 16384 28 16356 0% /var/volatile
tmpfs 13980 0 13980 0% /dev/shm
tmpfs 16384 0 16384 0% /media/ram
2.
Assuming I have 32MB heap buffer for DSP and ARM.
ARM code:
a. char buf[LENGTH];
b. char* buf = (char*) malloc(LENGTH);
c. char* buf = (char*) C6RUN_MEM_malloc(LENGTH);
As I understand it a will allocate memory from the stack, b from the heap, and c from the 32MB CMEM heap. Is that correct?
What if I run these commands in DSP code? Will they all take the requested memory from the CMEM heap?
Thanks in advance,
Mathias