Fix problems when update swap memory Upstream-commit: 6748cc10ac280950103d88a249f7d443715cf833 Component: engine