Maximum Memory Usage?

Hello all

on RTOS like ST20 OS, how to determine the maximum usage of RAM? the system now use 16 MB of SDRAM and we need to know what is the maximum of usage to reduce the size of ram in order to reduce product cost

thanx

------ Ahmed Samieh

Reply to
Ahmed Samieh
Loading thread data ...

Hi Ahmed, One way which we used was: Load the whole of SDRAM with a known value say 0xff or 0XDEADBEEF and the populate your application in SDRAM.Exercise the worst case scenerios with in your application where you believe there would be huge demand for memory.For eg,interactive applications would need more memory.Run every possible application and later see how much with in SDRAM is still 0xDEADBEEF.The total size of sdram minus the remaining total 0XDEADBEEF will give you the peak demand.

We use OS20 and was successful with this approach.

Regards, s.subbarayan

Reply to
ssubbarayan

You install a patched memory handler that logs everything. Plus you can tell the linker that you have less and less memory.

Rene

--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net
Reply to
Rene Tschaggelar

Hello s.subbarayan

thanx for this tip, but how to do that before the boot loader starts, and global variables initialized

Hello Rene

where to get this tool?

how to do ?

thanx

Reply to
Ahmed Samieh

This is an interesting approach. :):)

An event handler that records / logs the memory usage / freely- available at every few milliseconds will also help you.

Karthik Balaguru

Reply to
karthikbalaguru

Hi Rene, I have a query about this approach.One major problem with such a approach is keeping track of when memory is utilised and released back.At a point of time you may suddenly see lot of free memory and later due to application requirements it may grow so you may not get a real feeling of the actual consumption.How to avoid such a problem?

Regards, s.subbarayan

Reply to
ssubbarayan

Hi, I am not sure why would you need this before bootloader starts?I believe you are trying to ascertain the memory requirements in run time after the image is loaded to SDRAM from FLASH.If this is what you are looking for, then what I said may not work.But I believe these things need to be arrived at based on statistics of usage in run time rather then static analysis.

But once you have statistics you can configure your linker to place the contents on particular position needed by you.

Regards, s.subbarayan

Reply to
ssubbarayan

Maybe, you can try invoking the logging of the memory info either over the console or to a flash memory area. In Vxworks, I used to print the MemPool info on the console at regular intervals . If you are worried about exceeding certain limit of the RAM usage, then you need to get the memory free/available info from the mempool and check for the corresponding threshold limit. You need to have a separate memory monitor task .

Karthik Balaguru

Reply to
karthikbalaguru

Well, beside logging the amount requested, you can also deny the memory. Deny every request above some presettable limit.

Rene

--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net
Reply to
Rene Tschaggelar

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.