See an example of assertion to put condition on pointer not NULL: void resize( int *value ) { assert( value != NULL ); … measure( value, 0 ); … How to use assertions in C John Reekie This document describes
Namespaces (C++)
The latest version of this topic can be found atNamespaces (C++). A namespace is a declarative region that provides a scope to the identifiers (the names of types, functions, variables, etc) inside it. Namespaces are used to organize code into
Embedded Memory Allocation | Dr Dobb’s
Possibly the worst sin of calling malloc is that it might take a very long time to complete. You can find a lot of advice that you should avoid dynamic memory allocation on embedded systems. That’s pretty sound guidance. However,
Why is malloc() harmful in embedded systems? – Quora
Using malloc() or any other dynamic memory allocation is harmful in embedded systemsbecause: The memory is limited in embedded systems. (it is important that you do not suddenly find yourself out of memory). Fragmentation – embedded systems can run for
How to Use C’s volatile Keyword | Barr Group
volatile uint16_t x; uint8_t volatile * p_reg; uint16_t volatile * volatile p_y; A variable should be declared volatile whenever its value could change unexpectedly. In practice, only three types of variables could change: 1. Memory-mapped peripheral registers 2. Global variables