Added some pseudo code for allocator