"Using Rust custom allocators to optimize Solana compute units"
summary
Shows how to replace Solana’s 32KB/256KB default heap with a Rust global allocator backed by the first account data so state survives across transactions, raising usable heap to 10MB and avoiding repeated serialization for Neon EVM. Uses linked-list-allocator crate and Box::leak to store a pointer at a fixed address (example uses 0x46) and requires careful init/drop logic. Benchmarks target compute unit limits (default 200,000, max 1,400,000); example test runs and full code is on GitHub.
AI-written summary · about
