add randomized test for memory pool. Fix alignment issue it revealed