Revert "Vector instead of mmap to address malloc issue"

This reverts commit 558e1ab83155167b7679b3bac8ae2cc61a9ae633.