move alloc_pool to new header file