memory-pool: support variable

It will reduce memory usage without GC!