You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As detailed in #364, niche optimization of the
`Option` used in the `singleton!()` macro can lead to the initial value
of the static to contain non-zero bits. This in turn leads to the whole
static being moved from `.bss` to `.data` which means it eats up flash
space for no reason. Especially if the singleton stores a particularly
large type, this can be quite problematic.
Prevent this by using an explicit boolean flag instead of the `Option`
type. This is not quite as nice but at least there is no chance for the
`singleton!()` to end up in `.data`...
0 commit comments