You configure Levin to "always leave 2GB available". Levin checks the available diskspace using a simple statvfs call, deducts 2GB, and sees that as its budget. It then checks your diskspace every minute (more or less, depending on the device) to see if anything changes. If more free space is suddenly available, it will download more content. If there's less than 2GB available, it will immediately start deleting its own files until 2GB are free.
I'm not sure why you're concerned about RAM; the numbers I mentioned are all relating to diskspace. It doesn't take much RAM at all to run a torrent client daemon. FWIW it runs without any noticeable effects on my OnePlus 6 from 2018.
swap consumes disk. Commenter was talking about a scenario where swap dynamically filling and emptying space on the disk would make your software thrash