fix unmatched malloc()/free()
use size_t
Add JIT