Added basic allocator in prevision of implementing savestates.