The memory allocation to the gpu is defined in /boot/config.txt using the gpu_mem property.
Minimum is 16, default is 64. If you’re running graphics intensive apps on the Pi you can increase this value. If you’re running in headless mode then you can decrease it to 16 or 32.
More info here.