SBSufyan bin Uzayrinsufyanism.hashnode.dev·13h ago · 7 min readThe Memory Layout of Rust Enums: Discriminants, Niche Optimization, and AlignmentRust enum sizing equals the largest variant payload plus discriminant and trailing alignment padding. Ignoring variant balance bloats hot collections, blowing past L1 cache boundaries. Exploiting inva00
SBSufyan bin Uzayrinsufyanism.hashnode.dev·4d ago · 7 min readWhat Happens to the CPU Cache During sched_yieldYielding CPU execution via sched_yield() introduces catastrophic tail latency by forcing kernel register spills, Translation Lookaside Buffer evictions, and L1/L2 cache pollution. Voluntary thread swi00
SBSufyan bin Uzayrinsufyanism.hashnode.dev·Sep 24 · 6 min readDissecting the Rust Vtable: Dynamic Dispatch vs. Monomorphization in AssemblyDynamic dispatch via fat pointers imposes a double dereference penalty, prevents LLVM compiler inlining passes, and degrades CPU Branch Target Buffer throughput under polymorphic workloads, whereas ge00
SBSufyan bin Uzayrinsufyanism.hashnode.dev·Sep 21 · 8 min readWhy fork() Doesn't Duplicate Memory: Copy-on-Write and the Page Tablefork() relies on Copy-on-Write (COW) by duplicating page table hierarchies while marking physical pages read-only. When child or parent processes write to dense memory states, the resulting cascade of00
SBSufyan bin Uzayrinsufyanism.hashnode.dev·Sep 17 · 8 min readWhat std::mem::forget Actually Does to Heap Allocations?std::mem::forget drops the stack-allocated handle without executing Drop glue, permanently orphaning heap metadata within allocator arenas. It guarantees the absence of Undefined Behavior by design, w00