added the allocator interface
merged the alloc.cpp