Live data from Hacker News

The Power of Ten – Rules for Developing Safety Critical Code

spinroot.com

1–10 of 155 posts

Re: The Power of Ten – Rules for Developing Safety Critical Code

#3
Found the rule `There shall be no use of dynamic memory allocation after task initialization.`

They must use pre-allocated string buffers for some of the task's. Though I figured if you're doing a flight controller for a jet fighter or sate-light you don't need a lot of string parsing.

Re: The Power of Ten – Rules for Developing Safety Critical Code

#4
post #3

Found the rule `There shall be no use of dynamic memory allocation after task initialization.` They must use pre-allocated string buffers for some of the task's. Though I figured if you're doing a flight controller for a jet fighter or sate-light you don't need a lot of string parsing.

Almost all of the programs that I have ever read parse strings far too often. Almost all scientific and engineering software can eliminate it except at the UI and database.

Re: The Power of Ten – Rules for Developing Safety Critical Code

#6
post #3

Found the rule `There shall be no use of dynamic memory allocation after task initialization.` They must use pre-allocated string buffers for some of the task's. Though I figured if you're doing a flight controller for a jet fighter or sate-light you don't need a lot of string parsing.

I have written software for mobile network base stations where there were hardly any strings. I think it was only process names and log messages, both of which were string constants.

I imagine unmanned space software is similar; there is little need for a text UI on the spacecraft itself.

Re: The Power of Ten – Rules for Developing Safety Critical Code

#9
post #3

Found the rule `There shall be no use of dynamic memory allocation after task initialization.` They must use pre-allocated string buffers for some of the task's. Though I figured if you're doing a flight controller for a jet fighter or sate-light you don't need a lot of string parsing.

dynamic memory allocation is very much frowned upon in embedded systems, not just for strings.

Everything should be static and deterministic at all times. This is the easiest/only way to ensure you have no resource issues.

You should always (statically) allocate for maximum/worst case.. because you have analysed your worst-case, haven't you?

Re: The Power of Ten – Rules for Developing Safety Critical Code

#10
post #3

Found the rule `There shall be no use of dynamic memory allocation after task initialization.` They must use pre-allocated string buffers for some of the task's. Though I figured if you're doing a flight controller for a jet fighter or sate-light you don't need a lot of string parsing.

What counts as a task?
Post reply on HN