Enable memory compaction support

Prevent OOM caused by memory fragmentation