Memblock: Backport Memblock from 3.0.8 Source