<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Software Integrity Ltd</title>
	<atom:link href="http://software-integrity.com/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://software-integrity.com/blog</link>
	<description>Realtime and Embedded Software</description>
	<lastBuildDate>Fri, 21 Oct 2011 15:19:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Comment on WCP: How does your software stack up? by Peter Bushell</title>
		<link>http://software-integrity.com/blog/2011/10/18/wcp-how-does-your-software-stack-up/comment-page-1/#comment-782</link>
		<dc:creator>Peter Bushell</dc:creator>
		<pubDate>Fri, 21 Oct 2011 15:19:05 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=774#comment-782</guid>
		<description>You make a very important point, Dan, about the need to evaluate the stack requirement at the last minute. Perhaps it need not be done rigorously for every build, but a fresh evaluation (and adjustment, if necessary) should be done before each release.

My thoughts about doing some of the spadework at unit testing time are relevant here. If per-function figures can be obtained through an enhanced, automated test harness, then normal regression testing will produce fresh numbers each time. There remains the call-tree analysis, but that could be automated too (with some initial manual input for function pointers, which shouldn&#039;t need to be modified too often). These are my current thoughts and, like you, I welcome other people&#039;s.</description>
		<content:encoded><![CDATA[<p>You make a very important point, Dan, about the need to evaluate the stack requirement at the last minute. Perhaps it need not be done rigorously for every build, but a fresh evaluation (and adjustment, if necessary) should be done before each release.</p>
<p>My thoughts about doing some of the spadework at unit testing time are relevant here. If per-function figures can be obtained through an enhanced, automated test harness, then normal regression testing will produce fresh numbers each time. There remains the call-tree analysis, but that could be automated too (with some initial manual input for function pointers, which shouldn&#8217;t need to be modified too often). These are my current thoughts and, like you, I welcome other people&#8217;s.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on WCP: How does your software stack up? by Dan</title>
		<link>http://software-integrity.com/blog/2011/10/18/wcp-how-does-your-software-stack-up/comment-page-1/#comment-781</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Tue, 18 Oct 2011 17:05:21 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=774#comment-781</guid>
		<description>Good points about stack usage &amp; allocation.

One thing many engineers overlook - the problem that as software is refactored, debugged/fixed, enhanced, etc. its RAM usage (stack in particular) changes.  Maybe now we&#039;re using more stack in certain places, maybe now we&#039;re using less.  **But no one ever goes back &amp; re-evaluates the stack usage.**

I&#039;ve worked in (with) a lot of different organizations, and I can say confidently that very few of them do very detailed stack usage analysis in the first place... and even those who do tend to do it one time, during the initial development, and then the subject is never re-visited.  Typically task stacks (in the case of an RTOS) are sized conservatively, and then some kind of margin is added on top (either a fixed amount or a percentage).

My point is that the holy grail would be some way to analyze the worst case at build time, and then have some type of stack size configuration file generated which would be guaranteed to be sufficient / correct.  This file would be used at initialization (when tasks are created) to ensure stack sizes are adequate.

This is unattainable, however, because the dynamic nature of most programs makes this difficult or impossible.  For example, with function pointers, the call flow isn&#039;t known at compile time.  And with C++ and dynamic types (not to mention 3rd party libraries, etc.) the problem expands even further.  Now adjust your compiler options, inline (or un-inline) some routines, get rid of some globals &amp; pass more parameters, and bang! everything has changed again.  Change an iterative algorithm to a recursive one, yep that&#039;s gonna screw things up too...

I guess my point is that this is indeed a complex problem and I haven&#039;t found the proverbial silver bullet.  I just now went over to Nigel&#039;s post &amp; read it - he identified many of the same issues, especially the points about function pointers &amp; also not measuring once &amp; then forgetting about it.

I&#039;ll be interested to see what others have to say.  Although I&#039;m a big believer in doing the required rigorous work each time, what I&#039;d really like to see is some sort of automated process that (mostly) removes the human from the equation (in other words, a system that always ensures by the time the code is loaded on the target, we&#039;re &quot;guaranteed&quot; to not have stack overflow problems).  Not saying it&#039;s attainable, but it&#039;s an interesting thought.  Until then, I think we&#039;ll have to continue to use things like stack checking hooks, MPUs, etc. to detect the problem post-facto &amp; recover.</description>
		<content:encoded><![CDATA[<p>Good points about stack usage &amp; allocation.</p>
<p>One thing many engineers overlook &#8211; the problem that as software is refactored, debugged/fixed, enhanced, etc. its RAM usage (stack in particular) changes.  Maybe now we&#8217;re using more stack in certain places, maybe now we&#8217;re using less.  **But no one ever goes back &amp; re-evaluates the stack usage.**</p>
<p>I&#8217;ve worked in (with) a lot of different organizations, and I can say confidently that very few of them do very detailed stack usage analysis in the first place&#8230; and even those who do tend to do it one time, during the initial development, and then the subject is never re-visited.  Typically task stacks (in the case of an RTOS) are sized conservatively, and then some kind of margin is added on top (either a fixed amount or a percentage).</p>
<p>My point is that the holy grail would be some way to analyze the worst case at build time, and then have some type of stack size configuration file generated which would be guaranteed to be sufficient / correct.  This file would be used at initialization (when tasks are created) to ensure stack sizes are adequate.</p>
<p>This is unattainable, however, because the dynamic nature of most programs makes this difficult or impossible.  For example, with function pointers, the call flow isn&#8217;t known at compile time.  And with C++ and dynamic types (not to mention 3rd party libraries, etc.) the problem expands even further.  Now adjust your compiler options, inline (or un-inline) some routines, get rid of some globals &amp; pass more parameters, and bang! everything has changed again.  Change an iterative algorithm to a recursive one, yep that&#8217;s gonna screw things up too&#8230;</p>
<p>I guess my point is that this is indeed a complex problem and I haven&#8217;t found the proverbial silver bullet.  I just now went over to Nigel&#8217;s post &amp; read it &#8211; he identified many of the same issues, especially the points about function pointers &amp; also not measuring once &amp; then forgetting about it.</p>
<p>I&#8217;ll be interested to see what others have to say.  Although I&#8217;m a big believer in doing the required rigorous work each time, what I&#8217;d really like to see is some sort of automated process that (mostly) removes the human from the equation (in other words, a system that always ensures by the time the code is loaded on the target, we&#8217;re &#8220;guaranteed&#8221; to not have stack overflow problems).  Not saying it&#8217;s attainable, but it&#8217;s an interesting thought.  Until then, I think we&#8217;ll have to continue to use things like stack checking hooks, MPUs, etc. to detect the problem post-facto &amp; recover.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on ARM Cortex PendSV problem &amp; solution(?) by Peter Bushell</title>
		<link>http://software-integrity.com/blog/2011/09/27/arm-cortex-pendsv-problem-solution/comment-page-1/#comment-775</link>
		<dc:creator>Peter Bushell</dc:creator>
		<pubDate>Thu, 29 Sep 2011 12:28:41 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=765#comment-775</guid>
		<description>I just edited this post, so it may be worth revisiting it.</description>
		<content:encoded><![CDATA[<p>I just edited this post, so it may be worth revisiting it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on WCP: Uncertain Times&#8230; by Peter Bushell</title>
		<link>http://software-integrity.com/blog/2011/09/20/wcp-uncertain-times/comment-page-1/#comment-770</link>
		<dc:creator>Peter Bushell</dc:creator>
		<pubDate>Wed, 21 Sep 2011 14:38:24 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=738#comment-770</guid>
		<description>My Software Implication (3) is actually worse than stated above. Once a hardware timer has been started, the software has eventually to synchronise with it, by waiting for its expiry. As the Software timing is unpredictable, all we can be sure of is that the timer, once started, defines a &lt;u&gt;minimum&lt;/u&gt; time before which the software cannot pass the synchronisation point.</description>
		<content:encoded><![CDATA[<p>My Software Implication (3) is actually worse than stated above. Once a hardware timer has been started, the software has eventually to synchronise with it, by waiting for its expiry. As the Software timing is unpredictable, all we can be sure of is that the timer, once started, defines a <u>minimum</u> time before which the software cannot pass the synchronisation point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on WCP: The Worst Case Principle by Software Integrity Ltd &#187; WCP: Uncertain Times&#8230;</title>
		<link>http://software-integrity.com/blog/2011/09/08/wcp-the-worst-case-principle/comment-page-1/#comment-769</link>
		<dc:creator>Software Integrity Ltd &#187; WCP: Uncertain Times&#8230;</dc:creator>
		<pubDate>Tue, 20 Sep 2011 17:00:16 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=730#comment-769</guid>
		<description>[...] through with these definitions) is simply that. It is the software to which we are applying the WCP and which we are trying to make perfect. It does not include any third-party software, firmware, [...]</description>
		<content:encoded><![CDATA[<p>[...] through with these definitions) is simply that. It is the software to which we are applying the WCP and which we are trying to make perfect. It does not include any third-party software, firmware, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Whatever Happened to the Worst Case? by Software Integrity Ltd &#187; WCP: The Worst Case Principle</title>
		<link>http://software-integrity.com/blog/2011/08/25/whatever-happened-to-the-worst-case/comment-page-1/#comment-766</link>
		<dc:creator>Software Integrity Ltd &#187; WCP: The Worst Case Principle</dc:creator>
		<pubDate>Thu, 08 Sep 2011 17:26:17 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=719#comment-766</guid>
		<description>[...] last article, Whatever Happened to the Worst Case?, was a bit of a rant but it promised further articles on the subject. This is the first of these, [...]</description>
		<content:encoded><![CDATA[<p>[...] last article, Whatever Happened to the Worst Case?, was a bit of a rant but it promised further articles on the subject. This is the first of these, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Whatever Happened to the Worst Case? by Ian Johns</title>
		<link>http://software-integrity.com/blog/2011/08/25/whatever-happened-to-the-worst-case/comment-page-1/#comment-764</link>
		<dc:creator>Ian Johns</dc:creator>
		<pubDate>Wed, 31 Aug 2011 15:34:10 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=719#comment-764</guid>
		<description>I agree with the sentiment that companys&#039; rush-to-market will be the death of engineers and customers.</description>
		<content:encoded><![CDATA[<p>I agree with the sentiment that companys&#8217; rush-to-market will be the death of engineers and customers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Whatever Happened to the Worst Case? by Peter Bushell</title>
		<link>http://software-integrity.com/blog/2011/08/25/whatever-happened-to-the-worst-case/comment-page-1/#comment-763</link>
		<dc:creator>Peter Bushell</dc:creator>
		<pubDate>Wed, 31 Aug 2011 13:05:52 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=719#comment-763</guid>
		<description>Thanks to all!

Dave (and others), you might find this post interesting, though my comment underneath it is more relevant to your point about timescales:

http://embeddedgurus.com/stack-overflow/2011/08/rabbit-patches-and-embedded-systems/</description>
		<content:encoded><![CDATA[<p>Thanks to all!</p>
<p>Dave (and others), you might find this post interesting, though my comment underneath it is more relevant to your point about timescales:</p>
<p><a href="http://embeddedgurus.com/stack-overflow/2011/08/rabbit-patches-and-embedded-systems/" rel="nofollow">http://embeddedgurus.com/stack-overflow/2011/08/rabbit-patches-and-embedded-systems/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Whatever Happened to the Worst Case? by Dave Banham</title>
		<link>http://software-integrity.com/blog/2011/08/25/whatever-happened-to-the-worst-case/comment-page-1/#comment-762</link>
		<dc:creator>Dave Banham</dc:creator>
		<pubDate>Wed, 31 Aug 2011 11:12:15 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=719#comment-762</guid>
		<description>I totally agree!

In my experience, the one thing more than any other that contributes to poor quality is when management insist on development time scales that are too short and thereby result in the job being rushed and botched through. The very fact that we are using software in an embedded system means that the problem is more complex than can easily or cost effectively be solved by hardware alone. Therefore this complexity needs a commensurate amount of engineering time! The only way that I can see to deal with this problem is the practise of software estimation, even though this is just as difficult as Peter&#039;s experience with high reliability hardware design and often just as tedious. However, without it the software engineering team has no stick with which to bat back the big stick of management!</description>
		<content:encoded><![CDATA[<p>I totally agree!</p>
<p>In my experience, the one thing more than any other that contributes to poor quality is when management insist on development time scales that are too short and thereby result in the job being rushed and botched through. The very fact that we are using software in an embedded system means that the problem is more complex than can easily or cost effectively be solved by hardware alone. Therefore this complexity needs a commensurate amount of engineering time! The only way that I can see to deal with this problem is the practise of software estimation, even though this is just as difficult as Peter&#8217;s experience with high reliability hardware design and often just as tedious. However, without it the software engineering team has no stick with which to bat back the big stick of management!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Whatever Happened to the Worst Case? by Susan</title>
		<link>http://software-integrity.com/blog/2011/08/25/whatever-happened-to-the-worst-case/comment-page-1/#comment-761</link>
		<dc:creator>Susan</dc:creator>
		<pubDate>Tue, 30 Aug 2011 21:06:22 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=719#comment-761</guid>
		<description>It is so refreshing to read this article and the following comment by Dan. I heartily agree with you both and it is nice to know there are engineers out there like the 2 of you.</description>
		<content:encoded><![CDATA[<p>It is so refreshing to read this article and the following comment by Dan. I heartily agree with you both and it is nice to know there are engineers out there like the 2 of you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Whatever Happened to the Worst Case? by Peter Bushell</title>
		<link>http://software-integrity.com/blog/2011/08/25/whatever-happened-to-the-worst-case/comment-page-1/#comment-757</link>
		<dc:creator>Peter Bushell</dc:creator>
		<pubDate>Fri, 26 Aug 2011 17:03:09 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=719#comment-757</guid>
		<description>Thank you for your comment, Dan. I&#039;m not a great fan of procedures, either, and part of keeping those we do need (and we do need some!) as servants rather than masters is to build in more quality by design, rather than engaging in futile attempts to beat it in later via a test harness!</description>
		<content:encoded><![CDATA[<p>Thank you for your comment, Dan. I&#8217;m not a great fan of procedures, either, and part of keeping those we do need (and we do need some!) as servants rather than masters is to build in more quality by design, rather than engaging in futile attempts to beat it in later via a test harness!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Whatever Happened to the Worst Case? by Dan</title>
		<link>http://software-integrity.com/blog/2011/08/25/whatever-happened-to-the-worst-case/comment-page-1/#comment-756</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 26 Aug 2011 16:26:44 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=719#comment-756</guid>
		<description>Peter,

Hear, hear!  I wish more of our peers would take software quality seriously.  Over the years, I&#039;ve learned a lot by working with people who design firmwarethat is life-critical - peoples&#039; lives are saved when it works, and people die when it malfunctions.  I try to apply the same principles of every system I work on, even if lives aren&#039;t at stake. 

I&#039;ve found that shops that &quot;test bugs out of the system&quot; tend to have low quality.  By &quot;test bugs out of the system&quot;, I mean using the test phase to find bugs that they pretty much &quot;know&quot; are in there, because of deficiencies in specification / design / implementation phases.  In other words, they enter the test phase *expecting* to find bugs.  If the test phase was treated more like a verification phase, the expected outcome would be different.

In probably 3 or 4 opportunities in my career, I&#039;ve encountered someone who acknowledged a design deficiency, but basically said &quot;unlikely to happen, and too painful to design in prevention.&quot;  2 of the cases I can recall were race conditions.  In one case, the window was approximately 20 nsec, and the engineer said something to the effect &quot;It&#039;s so unlikely to happen, I&#039;m not going to go to the trouble to prevent it.&quot;  I said to him, &quot;If this firmware was in a product that your mother was using, and her life depended on it, would you have that same attitude?&quot;  Naturally, he decided it actually *was* worthwhile...

One other thing - you mentioned your early career as an electronics engineer &amp; the worst case.  About 3 years ago I was brought in to find &amp; fix a very strange problem... customer thought it was firmware, in fact the hardware manager said (literally) &quot;There is absolutely no possibility that this is a hardware problem.&quot;  Turns out it was hardware.  Complicated circuit with many resistors, 10% tolerance parts used on the board, and guess what?  The tolerances lined up in the circuit (almost +10% here, almost -10% there) such that readings &amp; behavior were intermittently erratic.  Original designer assumed a 470K resistor meant a 470K resistor, not possibly a 430K resistor.

Last thing - and I don&#039;t mean to steal your thunder, since you&#039;re going to be writing a series, but in addition to good design &amp; implementation, I think process can have a huge beneficial impact on quality.  I&#039;m not a process fanboy, I&#039;m in the &quot;just enough to make sense&quot; camp, but coding standards, code reviews, static analysis, version control, regression testing, etc. can all have huge impacts on the product&#039;s shipping quality.  Seems silly to even have to mention these activities, they should almost be a foregone conclusion, but sadly I can say that is *definitely* not the case.</description>
		<content:encoded><![CDATA[<p>Peter,</p>
<p>Hear, hear!  I wish more of our peers would take software quality seriously.  Over the years, I&#8217;ve learned a lot by working with people who design firmwarethat is life-critical &#8211; peoples&#8217; lives are saved when it works, and people die when it malfunctions.  I try to apply the same principles of every system I work on, even if lives aren&#8217;t at stake. </p>
<p>I&#8217;ve found that shops that &#8220;test bugs out of the system&#8221; tend to have low quality.  By &#8220;test bugs out of the system&#8221;, I mean using the test phase to find bugs that they pretty much &#8220;know&#8221; are in there, because of deficiencies in specification / design / implementation phases.  In other words, they enter the test phase *expecting* to find bugs.  If the test phase was treated more like a verification phase, the expected outcome would be different.</p>
<p>In probably 3 or 4 opportunities in my career, I&#8217;ve encountered someone who acknowledged a design deficiency, but basically said &#8220;unlikely to happen, and too painful to design in prevention.&#8221;  2 of the cases I can recall were race conditions.  In one case, the window was approximately 20 nsec, and the engineer said something to the effect &#8220;It&#8217;s so unlikely to happen, I&#8217;m not going to go to the trouble to prevent it.&#8221;  I said to him, &#8220;If this firmware was in a product that your mother was using, and her life depended on it, would you have that same attitude?&#8221;  Naturally, he decided it actually *was* worthwhile&#8230;</p>
<p>One other thing &#8211; you mentioned your early career as an electronics engineer &amp; the worst case.  About 3 years ago I was brought in to find &amp; fix a very strange problem&#8230; customer thought it was firmware, in fact the hardware manager said (literally) &#8220;There is absolutely no possibility that this is a hardware problem.&#8221;  Turns out it was hardware.  Complicated circuit with many resistors, 10% tolerance parts used on the board, and guess what?  The tolerances lined up in the circuit (almost +10% here, almost -10% there) such that readings &amp; behavior were intermittently erratic.  Original designer assumed a 470K resistor meant a 470K resistor, not possibly a 430K resistor.</p>
<p>Last thing &#8211; and I don&#8217;t mean to steal your thunder, since you&#8217;re going to be writing a series, but in addition to good design &amp; implementation, I think process can have a huge beneficial impact on quality.  I&#8217;m not a process fanboy, I&#8217;m in the &#8220;just enough to make sense&#8221; camp, but coding standards, code reviews, static analysis, version control, regression testing, etc. can all have huge impacts on the product&#8217;s shipping quality.  Seems silly to even have to mention these activities, they should almost be a foregone conclusion, but sadly I can say that is *definitely* not the case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Documenting Code with Doxygen by Dan</title>
		<link>http://software-integrity.com/blog/2011/06/17/documenting-code-with-doxygen/comment-page-1/#comment-751</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 12 Aug 2011 16:20:11 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=703#comment-751</guid>
		<description>Awesome Peter, glad to hear it.  Look forward to additional posts (not just on SKC++) when you have time...</description>
		<content:encoded><![CDATA[<p>Awesome Peter, glad to hear it.  Look forward to additional posts (not just on SKC++) when you have time&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Documenting Code with Doxygen by Peter Bushell</title>
		<link>http://software-integrity.com/blog/2011/06/17/documenting-code-with-doxygen/comment-page-1/#comment-750</link>
		<dc:creator>Peter Bushell</dc:creator>
		<pubDate>Fri, 12 Aug 2011 11:22:03 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=703#comment-750</guid>
		<description>Thank you for your words of encouragement, Dan.

I have certainly been neglecting my blog but have resolved to get back to it - though I don&#039;t have so much time for it as I had a year or so ago.

I&#039;ve been reviewing SKC++ and will revive it, with some changes, probably under a different name. I made the prototype; now I&#039;m going for the product!</description>
		<content:encoded><![CDATA[<p>Thank you for your words of encouragement, Dan.</p>
<p>I have certainly been neglecting my blog but have resolved to get back to it &#8211; though I don&#8217;t have so much time for it as I had a year or so ago.</p>
<p>I&#8217;ve been reviewing SKC++ and will revive it, with some changes, probably under a different name. I made the prototype; now I&#8217;m going for the product!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Documenting Code with Doxygen by Dan</title>
		<link>http://software-integrity.com/blog/2011/06/17/documenting-code-with-doxygen/comment-page-1/#comment-748</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 12 Aug 2011 03:20:51 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=703#comment-748</guid>
		<description>Peter, nice to see a blog post again.

Will you be continuing with the SKC++ series?  I enjoyed that &amp; hope that you have time to resurrect it!</description>
		<content:encoded><![CDATA[<p>Peter, nice to see a blog post again.</p>
<p>Will you be continuing with the SKC++ series?  I enjoyed that &amp; hope that you have time to resurrect it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Mysteries of C++ by Peter Bushell</title>
		<link>http://software-integrity.com/blog/2010/03/28/the-mysteries-of-c/comment-page-1/#comment-716</link>
		<dc:creator>Peter Bushell</dc:creator>
		<pubDate>Fri, 20 May 2011 15:13:47 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=607#comment-716</guid>
		<description>&lt;a href=&quot;#comment-714&quot; rel=&quot;nofollow&quot;&gt;@Gsidhu &lt;/a&gt; 
I was trying to allocate a static array to provide the pool space. The array-size calculation involved the size of the user&#039;s object (derived from Pooled). Unfortunately, the viability of such a calculation depends upon the order in which the compiler processes things in constructing the various objects. Some compilers handle it; some don&#039;t. None is required, by the C++ standard, to handle such esoteric stuff!

I got around the problem by allocating the initial pool space dynamically instead of declaring an array. (Static allocation, as originally attempted, would have been better, but I couldn&#039;t figure out a reliable way to automate it.) The pool memory can be taken from the standard heap (if you must); the actual pool is never given back, so there is no fragmentation issue. The preferred method, though, is to use my super-simple allocate-only code for obtaining pools. This is a configuration option and it works completely transparently - the user doesn&#039;t have to manage the initial allocation of pool space, except to ensure that sufficient total space is made available.

If you haven&#039;t already downloaded the code, I suggest that you do so and have a look through it. I expect to be updating it again soon, and will post another message when I have done so.</description>
		<content:encoded><![CDATA[<p><a href="#comment-714" rel="nofollow">@Gsidhu </a><br />
I was trying to allocate a static array to provide the pool space. The array-size calculation involved the size of the user&#8217;s object (derived from Pooled). Unfortunately, the viability of such a calculation depends upon the order in which the compiler processes things in constructing the various objects. Some compilers handle it; some don&#8217;t. None is required, by the C++ standard, to handle such esoteric stuff!</p>
<p>I got around the problem by allocating the initial pool space dynamically instead of declaring an array. (Static allocation, as originally attempted, would have been better, but I couldn&#8217;t figure out a reliable way to automate it.) The pool memory can be taken from the standard heap (if you must); the actual pool is never given back, so there is no fragmentation issue. The preferred method, though, is to use my super-simple allocate-only code for obtaining pools. This is a configuration option and it works completely transparently &#8211; the user doesn&#8217;t have to manage the initial allocation of pool space, except to ensure that sufficient total space is made available.</p>
<p>If you haven&#8217;t already downloaded the code, I suggest that you do so and have a look through it. I expect to be updating it again soon, and will post another message when I have done so.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Mysteries of C++ by Gsidhu</title>
		<link>http://software-integrity.com/blog/2010/03/28/the-mysteries-of-c/comment-page-1/#comment-714</link>
		<dc:creator>Gsidhu</dc:creator>
		<pubDate>Thu, 19 May 2011 23:25:54 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=607#comment-714</guid>
		<description>Hi Peter,
I am interested to know what the work around was, as i noticed something similar in the code written by my one of colleague.
Thanks in advance</description>
		<content:encoded><![CDATA[<p>Hi Peter,<br />
I am interested to know what the work around was, as i noticed something similar in the code written by my one of colleague.<br />
Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Subscribers by Peter Bushell</title>
		<link>http://software-integrity.com/blog/members/comment-page-1/#comment-529</link>
		<dc:creator>Peter Bushell</dc:creator>
		<pubDate>Fri, 19 Nov 2010 08:45:53 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?page_id=480#comment-529</guid>
		<description>You are now a subscriber, Prabhu!</description>
		<content:encoded><![CDATA[<p>You are now a subscriber, Prabhu!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Subscribers by Prabhu</title>
		<link>http://software-integrity.com/blog/members/comment-page-1/#comment-528</link>
		<dc:creator>Prabhu</dc:creator>
		<pubDate>Fri, 19 Nov 2010 08:33:49 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?page_id=480#comment-528</guid>
		<description>Subscribe me !!</description>
		<content:encoded><![CDATA[<p>Subscribe me !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on New version of dynamic memory software for C++ by Peter Bushell</title>
		<link>http://software-integrity.com/blog/2010/05/09/new-version-of-dynamic-memory-software-for-c/comment-page-1/#comment-473</link>
		<dc:creator>Peter Bushell</dc:creator>
		<pubDate>Thu, 13 May 2010 18:08:53 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=633#comment-473</guid>
		<description>Thanks for the recommendation, Monte. I use VC++ a lot for developing and prototyping my code, even though it is invariably destined for some embedded system using a different tool chain. Memory leaks are hard to find, and tools to find them tend to exist only for IT-type toolchains - another good reason to use such toolchains for prototyping and initial debugging, where possible.

My code, which you can download if you wish, can&#039;t detect or prevent the coding errors which cause memory leaks but definitely can get rid of the fragmentation problem inherent in all heap (variable block size) allocation systems. No tool can help you with this! IT programmers can generally ignore fragmentation and get away with it; embedded programmers most certainly cannot.

Actually, I lied. The &lt;em&gt;Managed&lt;/em&gt; class and its associated smart &lt;em&gt;Ptr&lt;/em&gt; class are now part of my software bundle and proper use of these can help greatly to prevent memory leaks.</description>
		<content:encoded><![CDATA[<p>Thanks for the recommendation, Monte. I use VC++ a lot for developing and prototyping my code, even though it is invariably destined for some embedded system using a different tool chain. Memory leaks are hard to find, and tools to find them tend to exist only for IT-type toolchains &#8211; another good reason to use such toolchains for prototyping and initial debugging, where possible.</p>
<p>My code, which you can download if you wish, can&#8217;t detect or prevent the coding errors which cause memory leaks but definitely can get rid of the fragmentation problem inherent in all heap (variable block size) allocation systems. No tool can help you with this! IT programmers can generally ignore fragmentation and get away with it; embedded programmers most certainly cannot.</p>
<p>Actually, I lied. The <em>Managed</em> class and its associated smart <em>Ptr</em> class are now part of my software bundle and proper use of these can help greatly to prevent memory leaks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on New version of dynamic memory software for C++ by Monte</title>
		<link>http://software-integrity.com/blog/2010/05/09/new-version-of-dynamic-memory-software-for-c/comment-page-1/#comment-472</link>
		<dc:creator>Monte</dc:creator>
		<pubDate>Thu, 13 May 2010 15:31:01 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=633#comment-472</guid>
		<description>The best tool to avoid memory leaks in C++ apps is Deleaker ( http://deleaker.com/ )</description>
		<content:encoded><![CDATA[<p>The best tool to avoid memory leaks in C++ apps is Deleaker ( <a href="http://deleaker.com/" rel="nofollow">http://deleaker.com/</a> )</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on New version of dynamic memory software for C++ by Prasanth</title>
		<link>http://software-integrity.com/blog/2010/05/09/new-version-of-dynamic-memory-software-for-c/comment-page-1/#comment-469</link>
		<dc:creator>Prasanth</dc:creator>
		<pubDate>Mon, 10 May 2010 03:21:30 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=633#comment-469</guid>
		<description>Appreciate your efforts!</description>
		<content:encoded><![CDATA[<p>Appreciate your efforts!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Subscribers by Peter Bushell</title>
		<link>http://software-integrity.com/blog/members/comment-page-1/#comment-466</link>
		<dc:creator>Peter Bushell</dc:creator>
		<pubDate>Fri, 30 Apr 2010 12:42:30 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?page_id=480#comment-466</guid>
		<description>&lt;a href=&quot;#comment-465&quot; rel=&quot;nofollow&quot;&gt;@Bulla Singh &lt;/a&gt; 
Will do, but later today. (My day is just beginning, as I am delivering a course in Costa Rica). Have you tried subscribing yourself? It should be quicker. I&#039;ll check later to see if you succeeded and, if not, I&#039;ll add you to the list myself.

Thank you for your interest.</description>
		<content:encoded><![CDATA[<p><a href="#comment-465" rel="nofollow">@Bulla Singh </a><br />
Will do, but later today. (My day is just beginning, as I am delivering a course in Costa Rica). Have you tried subscribing yourself? It should be quicker. I&#8217;ll check later to see if you succeeded and, if not, I&#8217;ll add you to the list myself.</p>
<p>Thank you for your interest.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Subscribers by Bulla Singh</title>
		<link>http://software-integrity.com/blog/members/comment-page-1/#comment-465</link>
		<dc:creator>Bulla Singh</dc:creator>
		<pubDate>Fri, 30 Apr 2010 10:11:24 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?page_id=480#comment-465</guid>
		<description>Please add me to your list. Thanks.</description>
		<content:encoded><![CDATA[<p>Please add me to your list. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on SKC++: No semaphores! by Peter Bushell</title>
		<link>http://software-integrity.com/blog/2010/01/07/skc-no-semaphores/comment-page-1/#comment-110</link>
		<dc:creator>Peter Bushell</dc:creator>
		<pubDate>Sat, 06 Feb 2010 09:27:29 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=464#comment-110</guid>
		<description>&lt;a href=&quot;#comment-107&quot; rel=&quot;nofollow&quot;&gt;@David Stonier-Gibson &lt;/a&gt;
David, thank you for contributing to the debate. I sense a touch of the Devil&#039;s Advocate, which is healthy.

The three basic principles which guided me in the design of SKC++ were that it should be:

-  Easy to learn
-  Easy to use
-  Difficult to misuse

My own experience and that of other engineers that I have asked about it is that we like to reserve our time and creativity for the challenge facing us. We don&#039;t want to waste too much time learning how a tool works, or agonising about its options; that should not be part of the challenge. I regard SKC++ primarily as a tool for Application Engineers.

Richness does have its place and there is an argument that you appeal to a greater market if you provide all the traditional, &quot;expected&quot; features as well as any new ones. However, my mission these days is not to sell millions of copies of SKC++ (though more than one or two would be nice), but to distil decades of experience into what I do and deliver only the best bits, thereby making my small contribution to improving embedded software quality. (For the historical enlightenment of those starting out in the profession, I might occasionally blog about the less good bits, but that&#039;s another subject.)

Of course the problem with Occam&#039;s Razor is that you can slice off too much. But to counter that by adding redundant features &quot;just in case&quot; is cowardice. There&#039;s a thin line somewhere in between and that&#039;s why I threw the Semaphore argument open.

Here are some other arguments for the lean approach:

-  Quicker to market (though I still haven&#039;t got there)
-  Less to go wrong
-  Easier to add features, on demand, than to take them away after publication

Who knows, I might make more money adding redundant features for traditionalists (or others stuck in their ways by choice or by circumstance) than I make from the basic product!</description>
		<content:encoded><![CDATA[<p><a href="#comment-107" rel="nofollow">@David Stonier-Gibson </a><br />
David, thank you for contributing to the debate. I sense a touch of the Devil&#8217;s Advocate, which is healthy.</p>
<p>The three basic principles which guided me in the design of SKC++ were that it should be:</p>
<p>-  Easy to learn<br />
-  Easy to use<br />
-  Difficult to misuse</p>
<p>My own experience and that of other engineers that I have asked about it is that we like to reserve our time and creativity for the challenge facing us. We don&#8217;t want to waste too much time learning how a tool works, or agonising about its options; that should not be part of the challenge. I regard SKC++ primarily as a tool for Application Engineers.</p>
<p>Richness does have its place and there is an argument that you appeal to a greater market if you provide all the traditional, &#8220;expected&#8221; features as well as any new ones. However, my mission these days is not to sell millions of copies of SKC++ (though more than one or two would be nice), but to distil decades of experience into what I do and deliver only the best bits, thereby making my small contribution to improving embedded software quality. (For the historical enlightenment of those starting out in the profession, I might occasionally blog about the less good bits, but that&#8217;s another subject.)</p>
<p>Of course the problem with Occam&#8217;s Razor is that you can slice off too much. But to counter that by adding redundant features &#8220;just in case&#8221; is cowardice. There&#8217;s a thin line somewhere in between and that&#8217;s why I threw the Semaphore argument open.</p>
<p>Here are some other arguments for the lean approach:</p>
<p>-  Quicker to market (though I still haven&#8217;t got there)<br />
-  Less to go wrong<br />
-  Easier to add features, on demand, than to take them away after publication</p>
<p>Who knows, I might make more money adding redundant features for traditionalists (or others stuck in their ways by choice or by circumstance) than I make from the basic product!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Subscribers by Peter Bushell</title>
		<link>http://software-integrity.com/blog/members/comment-page-1/#comment-109</link>
		<dc:creator>Peter Bushell</dc:creator>
		<pubDate>Sat, 06 Feb 2010 09:16:18 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?page_id=480#comment-109</guid>
		<description>&lt;a href=&quot;#comment-106&quot; rel=&quot;nofollow&quot;&gt;@lrreiche &lt;/a&gt; 

Thanks for your comment about DO-178B. I&#039;ve moved it to the Software Download page (link above), and have replied to it there.</description>
		<content:encoded><![CDATA[<p><a href="#comment-106" rel="nofollow">@lrreiche </a> </p>
<p>Thanks for your comment about DO-178B. I&#8217;ve moved it to the Software Download page (link above), and have replied to it there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on SKC++: No semaphores! by David Stonier-Gibson</title>
		<link>http://software-integrity.com/blog/2010/01/07/skc-no-semaphores/comment-page-1/#comment-107</link>
		<dc:creator>David Stonier-Gibson</dc:creator>
		<pubDate>Fri, 05 Feb 2010 21:34:51 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=464#comment-107</guid>
		<description>Peter, a slightly different angle on the debate: If you are attempting to make the leanest possible system, and feature X can be eliminated, then consider eliminating it. If OTOH you want to make a rich system that gives users a choice of how they go about things, then consider including the feature even if it is &quot;redundant&quot;.

Getting a product accepted is about the user experience. That applies as much to an RTOS as to a toy like an iPad. Have you ever stood behind someone while they use a program you are a hot shot at, say Excel, and suddenly notice them doing something in quite a different way to how you would? That&#039;s richness.

The other argument in favour of richness is that it gives uses more opportunities to perhaps use the product in ways you, the maker, didn&#039;t anticipate. Which of course in an RTOS may not always be a Good Thing :-)

David Stonier-Gibson http://splatco.com</description>
		<content:encoded><![CDATA[<p>Peter, a slightly different angle on the debate: If you are attempting to make the leanest possible system, and feature X can be eliminated, then consider eliminating it. If OTOH you want to make a rich system that gives users a choice of how they go about things, then consider including the feature even if it is &#8220;redundant&#8221;.</p>
<p>Getting a product accepted is about the user experience. That applies as much to an RTOS as to a toy like an iPad. Have you ever stood behind someone while they use a program you are a hot shot at, say Excel, and suddenly notice them doing something in quite a different way to how you would? That&#8217;s richness.</p>
<p>The other argument in favour of richness is that it gives uses more opportunities to perhaps use the product in ways you, the maker, didn&#8217;t anticipate. Which of course in an RTOS may not always be a Good Thing <img src='http://software-integrity.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>David Stonier-Gibson <a href="http://splatco.com" rel="nofollow">http://splatco.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Subscribers by Peter Bushell</title>
		<link>http://software-integrity.com/blog/members/comment-page-1/#comment-99</link>
		<dc:creator>Peter Bushell</dc:creator>
		<pubDate>Thu, 28 Jan 2010 14:38:01 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?page_id=480#comment-99</guid>
		<description>Now that automatic registration is working, I&#039;ve deleted the comments via which early subscribers requested registration.

To those people:
You are still registered, of course, and I have changed nothing in your user accounts!</description>
		<content:encoded><![CDATA[<p>Now that automatic registration is working, I&#8217;ve deleted the comments via which early subscribers requested registration.</p>
<p>To those people:<br />
You are still registered, of course, and I have changed nothing in your user accounts!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on SKC++: No semaphores! by David Thompson</title>
		<link>http://software-integrity.com/blog/2010/01/07/skc-no-semaphores/comment-page-1/#comment-96</link>
		<dc:creator>David Thompson</dc:creator>
		<pubDate>Wed, 20 Jan 2010 14:02:40 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=464#comment-96</guid>
		<description>&lt;a href=&quot;#comment-93&quot; rel=&quot;nofollow&quot;&gt;@Peter Bushell  &lt;/a&gt; 
Surprisingly I came across rendezvous recently disguised under the term &quot;synchronous events&quot;, which, when explained, was something like &quot;I send you an event/message, you do something (whilst I wait) and then send me another event/message in response&quot;. So your kernel will cover this kind of pattern perfectly adequately.</description>
		<content:encoded><![CDATA[<p><a href="#comment-93" rel="nofollow">@Peter Bushell  </a><br />
Surprisingly I came across rendezvous recently disguised under the term &#8220;synchronous events&#8221;, which, when explained, was something like &#8220;I send you an event/message, you do something (whilst I wait) and then send me another event/message in response&#8221;. So your kernel will cover this kind of pattern perfectly adequately.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on SKC++: No semaphores! by Peter Bushell</title>
		<link>http://software-integrity.com/blog/2010/01/07/skc-no-semaphores/comment-page-1/#comment-95</link>
		<dc:creator>Peter Bushell</dc:creator>
		<pubDate>Tue, 19 Jan 2010 19:35:48 +0000</pubDate>
		<guid isPermaLink="false">http://software-integrity.com/blog/?p=464#comment-95</guid>
		<description>&lt;a href=&quot;#comment-91&quot; rel=&quot;nofollow&quot;&gt;@Dave Banham &lt;/a&gt; 
I looked at OSE some time ago, and Sciopta after reading your comment. While I like their approach in general, they both exhibit two things which I&#039;m trying to counter:

- Too many system calls
- Written in C

</description>
		<content:encoded><![CDATA[<p><a href="#comment-91" rel="nofollow">@Dave Banham </a><br />
I looked at OSE some time ago, and Sciopta after reading your comment. While I like their approach in general, they both exhibit two things which I&#8217;m trying to counter:</p>
<p>- Too many system calls<br />
- Written in C</p>
]]></content:encoded>
	</item>
</channel>
</rss>

