From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ee6e394aae0270ff X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-04 15:42:53 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!chcgil2-snh1.gtei.net!news.bbnplanet.com!wn14feed!worldnet.att.net!attbi_feed3!attbi.com!attbi_s51.POSTED!not-for-mail From: "Jeff C," Newsgroups: comp.lang.ada References: Subject: Re: How to calculate optimum task size? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: <0y1Kb.125953$VB2.391648@attbi_s51> NNTP-Posting-Host: 24.34.215.119 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s51 1073259772 24.34.215.119 (Sun, 04 Jan 2004 23:42:52 GMT) NNTP-Posting-Date: Sun, 04 Jan 2004 23:42:52 GMT Organization: Comcast Online Date: Sun, 04 Jan 2004 23:42:52 GMT Xref: archiver1.google.com comp.lang.ada:4107 Date: 2004-01-04T23:42:52+00:00 List-Id: I have seen tools that claim to be able to compute worste case stack usage (assuming no recursive calls) but I have never been in a position to make use of them. (Aonix has something called TSAT http://www.acm.org/sigada/wg/asiswg/ASIS_Clients.html) I usually try to make an initial sloppy estimate by doing a hand roll-up of object sizes walking down a call tree (it usually sounds scarier than it is for most tasks)..Then (for vxWorks) let the system run for a while ...Especially if you can present the system with "worste case" date. Then do a checkStack >From the target shell. It should show the the high water mark for stack usage for all tasks. I usually (assuming I can afford the memory) will then set default stack sizes 2x the high water level (unless it conflicts with the hand estimate). Except for some special cases you sometimes have to avoid (like aggregate assignment into a large structure on some compilers) most tasks need very little stack size so even the 2x value ends up using a very small ammount of the total memory. "Baris Gokbudak" wrote in message news:c9267c2d.0401041430.4aeefc2@posting.google.com... > Hi. > At work we are using default sizes for tasks.But we have a memory size > problem and as we are doing a real time system we should minimize the > task sizes etc.But when we set a smaller size for a task we are not > sure if it is the optimum size for that size.Is there any way to > calculate the optimum task size for a task?We are compiling the > project in Sparc 5 SUN.The real time system is used in VXWorks > operating system. > I am looking forward for any suggestion.