RAM management is horrible I think since SFOS 4.0. I have smartphone with 4GB RAM (Redmi 5 Plus) and often after few day using, system freezes and reboot itself because of low free RAM. To prevent that, I use in terminal command free -m to see available free RAM and then use one of these commands to release some memory, often it goes free from 100-200MiB to 1.0-1.5GiB.
devel-su sh -c ‘echo 1 > /proc/sys/vm/drop_caches’
devel-su sh -c ‘echo 2 > /proc/sys/vm/drop_caches’
devel-su sh -c ‘echo 3 > /proc/sys/vm/drop_caches’
In times of SFOS 2.0 on Nexus 4 with 2GB RAM I often had uptime about 3 weeks and never had this problem with RAM management.