Xiaomi's come with that feature enabled.that sounds like its just using unused disk space as a swapfile, which would sorta help. it would let you use that space for swapping off ram, clearing the actual physical ram you have. it wont be as fast as actual ram since it has to reread the file from disk and copy that data back to ram. im not sure if android requires root permissions for swapfiles or not... pretty sure linux does (i havent used swap files/partitions for years since i upgraded to more ram+SSD)
at any rate OP, you should try one of the apps that create a swapfile for you first.