Effective C: An Introduction to Professional C Programming by Robert C. Seacord

Effective C: An Introduction to Professional C Programming by Robert C. Seacord

Author:Robert C. Seacord
Language: eng
Format: epub, pdf
Publisher: No Starch Press, Inc.
Published: 2020-08-01T16:00:00+00:00


Safety-Critical Systems

Systems with high safety requirements frequently ban the use of dynamic memory, because memory managers can have unpredictable behavior that significantly impacts performance. Forcing all applications to live within a fixed, pre-allocated area of memory can eliminate many of these problems and make it easier to verify memory use. In the absence of recursion, alloca, and VLAs (also prohibited in safety-critical systems), an upper bound on the use of stack memory can be derived statically, making it possible to prove that sufficient storage exists to execute the functionality of the application for all possible inputs.

GCC also has a -Wvla flag that warns if a VLA is used, and a -Wvla-larger -than=byte-size flag that warns for declarations of VLAs whose size is either unbounded, or bounded by an argument that allows the array size to exceed byte-size bytes.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.