memory pooling optimizing