Swap allocation implmeneted