C++ fix: make C++ heap size configurable
C++ fix: improve performance on file reading and string split
C++ fix: add compile flag for thread-safe malloc