Implementation of memory pools