Make tripgen use external memory block to improve performance