sudo raspi-config select 'expand filesystem' (just to kill 2 birds with 1 stone) next select 'advanced options' select 'memory split' set to 128 (you can play around with this number -> anything between 64 and 256, but 128 seems to work best for me) select 'Back' select 'Finish'
it allocates ram between general purpose and video.