Astroberry uses swapping to a compressing RAM disk (maybe the default for Ubuntu Mate). That might be helpful when unused program parts are put away in a compressed form to provide more memory for active programs. But I think it is not a good idea when memory is already scarce.
I am using a swapfile now with swappiness set to 0 (only swap when absolutely necessary). On zooming in FITS Viewer the Pi did become very slow, as expected due to swapping to sd-card, but KStars FITS Viewer did not crash yet.
What you have to do:
$ sudo apt install dphys-swapfile
You can configure it in /etc/dphys-swapfile, but default settings seem to be OK. It will use a 2GB swapfile (Maybe too big. I guess the Pi will become unusable before this is fully used)
Set swappiness to 0 by adding "vm.swappiness = 0" to the end of /etc/sysctl.conf.