#330: added allocator for graph class