Move allocator's implementation to allocator.cpp.