added mem/Allocator to deal with memory alignment