add singleton interface for allocator
add test for single memory allocator