Discussion about this post

User's avatar
Neural Foundry's avatar

Really solid breakdown of the zeroing guarantees across the entire allocation lifecycle. The needzero flag detail is particularly useful sinec most devs never look at span metadata, and knowing that sweep can defer zeroing to allocation time explains why some profiling shows those memclr calls spiking unexpectedly. I ran into this exact behavior optimizing a buffer-heavy service where we assumed zero-init was "free" until allocator traces showed otherwise, switching to careful buffer reuse cut those costs way down.

Expand full comment
1 more comment...

No posts

Ready for more?