A prototype of memory pool implemented in template