Page MenuHomeFreeBSD

yes: Avoid static initialization
ClosedPublic

Authored by des on Aug 17 2026, 2:14 PM.
Tags
None
Referenced Files
F174352682: D58890.id184200.diff
Fri, Oct 2, 3:24 PM
Unknown Object (File)
Thu, Oct 1, 3:16 AM
Unknown Object (File)
Wed, Sep 30, 2:41 AM
Unknown Object (File)
Mon, Sep 21, 4:55 PM
Unknown Object (File)
Sat, Sep 19, 1:39 AM
Unknown Object (File)
Wed, Sep 16, 8:49 PM
Unknown Object (File)
Fri, Sep 11, 8:14 PM
Unknown Object (File)
Fri, Sep 11, 6:06 AM
Subscribers

Details

Summary

Our buffer is half a megabyte, but we are only initializing the first
two bytes. Switching from static to dynamic initialization moves it
from .data to .bss, greatly reducing the size of the binary.

Fixes: cf74b63d61b4 ("yes: Completely overengineer")
MFC after: 1 week
Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable