only use ptmalloc in sandbox, lazy js init.