For a Pi, you can even change the memory split if dont use any graphical desktop features etc:
gpu_mem
Specifies how much memory, in megabytes, to reserve for the exclusive use of the GPU: the remaining memory is allocated to the ARM CPU for use by the OS. For Pis with less than 1GB of memory, the default is 64; for Pis with 1GB or more of memory the default is 76.
https://www.raspberrypi.com/documentation/computers/config_txt.html
Run sudo raspi-config
and select:
Performance Options --> GPU Memory
I've just just now as an experiment changed it into 16MB.
Before:
pi@ph5a:~ $ free -h
total used free shared buff/cache available
Mem: 176Mi 38Mi 51Mi 2.0Mi 86Mi 88Mi
Swap: 99Mi 41Mi 58Mi
After:
pi@ph5b:~ $ free -h
total used free shared buff/cache available
Mem: 477Mi 43Mi 317Mi 3.0Mi 116Mi 381Mi
Swap: 99Mi 0B 99Mi
Wrong Pi, below is correct one:
pi@ph5a:~ $ free -h
total used free shared buff/cache available
Mem: 224Mi 38Mi 56Mi 5.0Mi 129Mi 132Mi
Swap: 99Mi 0B 99Mi
pi@ph5a:~ $ cat /boot/config.txt
[..]
gpu_mem=16