Optimize SWAP
Fix genalloc
Add optimized msm_rng generator