memory-pool: support snippet

It will reduce memory usage without GC!