Create swap file on Raspberry Pi Zero W

First check if you have swap configured:

swapon --show

IF empty you can create for example 256MB swap file with following commands:

fallocate -l 256M /var/swap
chmod 600 /var/swap
mkswap /var/swap
swapon /var/swap

You can again check if swap is properly configured:

#swapon --show
NAME      TYPE SIZE USED PRIO
/var/swap file 256M   0B   -2

#free -m
              total        used        free      shared  buff/cache   available
Mem:            480         109         140           9         229         312
Swap:           255           0         255

How to make Raspberry Pi work with 1024×600 resolution

Please edit your /boot/config.txt file with following contents:

# uncomment to force a console size. By default it will be display's size minus
# overscan.
framebuffer_width=1024
framebuffer_height=600

hdmi_force_hotplug=1
#hdmi_ignore_edid=0xa5000080
hdmi_cvt=1024 600 60 3 0 0 0

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=2
hdmi_mode=87