That is worse than just disabling the pagefile, because you get the downside of both, having a pagefile and not having a pagefile.
This way, unused memory is still occupying space in pagefile, which is actually on ram, but with the addition of wasted CPU overhead.