add memory pool to optimize the performance and avoid GC thread.