The current pinned memory implementation in `pinned_memory` branch runs into a segfault when a block is allocated and freed ,and allocated again.