3 ms·
I prefer forcing a top-down initialization using placement new for any extent globals, that way initialization order can be carefully controlled. E.g. the OS g
by Espressosaurus 10y ago
I prefer forcing a top-down initialization using placement new for any extent globals, that way initialization order can be carefully controlled. E.g. the OS gets started before we even bother bringing anything else up, other initialization happens in a separate task, then worker tasks are brought up, etc. Everything is sequenced, and we don't have to go to the linker script to figure out what's actually getting called.
Since the globals are singletons, any attempt to get their instance when they've already initialized is an error that will blow the program up. Helps keep us honest.