Added MemBlock class to handle memory block allocation and management