Page MenuHomeFreeBSD

yes: Avoid static initialization
ClosedPublic

Authored by des on Mon, Aug 17, 2:14 PM.
Tags
None
Referenced Files
F170601245: D58890.id184196.diff
Sat, Sep 5, 2:29 PM
F170575653: D58890.diff
Sat, Sep 5, 11:44 AM
Unknown Object (File)
Fri, Sep 4, 8:37 AM
Unknown Object (File)
Fri, Sep 4, 3:52 AM
Unknown Object (File)
Fri, Sep 4, 12:22 AM
Unknown Object (File)
Thu, Sep 3, 11:40 AM
Unknown Object (File)
Wed, Sep 2, 9:05 PM
Unknown Object (File)
Wed, Sep 2, 7:29 PM
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