-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a 64K static for zeroed scratch space in upb
The actual construction of the zeroed block is now entirely safe. This will be accessed in nearly every program using protobuf. Using a static in .bss has much less overhead than an atomically-constructed dynamic allocation and is far more predictable for space-constrained systems. In the future, if dynamic allocation is kept, it should use std::sync::OnceLock instead of the much less safe Once combined with `static mut`. PiperOrigin-RevId: 609635555
- Loading branch information
1 parent
8afaae5
commit 4395d97
Showing
1 changed file
with
11 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters