Reply by Rene Tschaggelar October 12, 20072007-10-12
ssubbarayan wrote:

> On Oct 11, 2:00 pm, Rene Tschaggelar <n...@none.net> wrote: > >>Ahmed Samieh wrote: >> >>>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 >> >>You install a patched memory handler that logs >>everything. Plus you can tell the linker that >>you have less and less memory. >> > > 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?
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 by karthikbalaguru October 12, 20072007-10-12
On Oct 12, 10:34 am, ssubbarayan <ssu...@gmail.com> wrote:
> On Oct 11, 2:00 pm, Rene Tschaggelar <n...@none.net> wrote: > > > > > > > Ahmed Samieh wrote: > > > 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 > > > 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 > > 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? >
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 by ssubbarayan October 12, 20072007-10-12
On Oct 11, 2:21 pm, Ahmed Samieh <Asm4...@gmail.com> wrote:
> On Oct 11, 7:00 am, ssubbarayan <ssu...@gmail.com> wrote: > > > > > > > On Oct 10, 11:44 pm, Ahmed Samieh <Asm4...@gmail.com> wrote: > > > > 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 > > > 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 > > Hello s.subbarayan > > thanx for this tip, > but how to do that before the boot loader starts, and global variables > initialized > > Hello Rene > > > You install a patched memory handler that logs everything. > > where to get this tool? > > > Plus you can tell the linker that you have less and less memory. > > how to do ? > > thanx- Hide quoted text - > > - Show quoted text -
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 by ssubbarayan October 12, 20072007-10-12
On Oct 11, 2:00 pm, Rene Tschaggelar <n...@none.net> wrote:
> Ahmed Samieh wrote: > > 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 > > 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
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 by karthikbalaguru October 11, 20072007-10-11
On Oct 11, 10:00 am, ssubbarayan <ssu...@gmail.com> wrote:
> On Oct 10, 11:44 pm, Ahmed Samieh <Asm4...@gmail.com> wrote: > > > 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 > > 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.
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 by Ahmed Samieh October 11, 20072007-10-11
On Oct 11, 7:00 am, ssubbarayan <ssu...@gmail.com> wrote:
> On Oct 10, 11:44 pm, Ahmed Samieh <Asm4...@gmail.com> wrote: > > > 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 > > 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
Hello s.subbarayan thanx for this tip, but how to do that before the boot loader starts, and global variables initialized Hello Rene
> You install a patched memory handler that logs everything.
where to get this tool?
> Plus you can tell the linker that you have less and less memory.
how to do ? thanx
Reply by Rene Tschaggelar October 11, 20072007-10-11
Ahmed Samieh wrote:

> 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
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 by ssubbarayan October 11, 20072007-10-11
On Oct 10, 11:44 pm, Ahmed Samieh <Asm4...@gmail.com> wrote:
> 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
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 by Ahmed Samieh October 10, 20072007-10-10
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