This answer assumes that you know what static storage duration means.
In C++03 this is specified as (3.6.2):
Objects with static storage duration (3.7.1) shall be zero-initialized
(8.5) before any other initialization takes place. Zero-initialization
and initialization with a constant expression are collectively called
static initialization; all other initialization is dynamic
initialization.
In practice, a program has different memory segments where it stores variables with static storage duration:
- One segment is usually called
.bss
, where all static storage variables that are initialized to zero are stored.
- Another segment is usually called
.data
, where all static storage variables that are explicitly initialized to a value are stored.
- And further, there is a segment called
.rodata
where all const
variables are stored.
(The reason why these are two different segments is mainly program startup performance, you can read more about that here.)
Zero initialization applies to all variables stored in .bss
and constant initialization applies to all variables stored in .data
. (And perhaps constant initialization applies to .rodata
as well, depending on whether your system is RAM-based or if it has true ROM).
Collectively, all of this is called static initialization, since it applies to objects with static storage duration.