How do increase the swap size of my Wubi installation?

Just follow the Wubi Guide. While some of the other answers may work, you must make sure you don't create the swap file on the loop mounted device, which may see decrease in performance.

See https://wiki.ubuntu.com/WubiGuide#How_do_I_increase_my_swap_space.3F

How do I increase my swap space?

The following will increase your swap to 2 GB. Replace count= with the number of kilobytes you want for your swap file.

sudo su
swapoff -a
cd /host/ubuntu/disks/
mv swap.disk swap.disk.bak
dd if=/dev/zero of=swap.disk bs=1024 count=2097152
mkswap swap.disk
swapon -a
free -m

I've never used Wubi before, but I'm guessing that adding partitions might be complicated. However, there's no rule that says that you need to use a swap partition. You can use a swap file, as well, and store it anywhere you like on the system. I'd likely choose /media, but it's up to you. Here's how:

  1. Create your extra swap file and set the appropriate permissions. You can put it anywhere you like. Set the size equal to how much additional swap space you want.

    sudo fallocate -l 1g /path/to/desired/file
    sudo chmod 600 /path/to/desired/file
    
  2. Format your swap file:

    sudo mkswap /path/to/desired/file
    
  3. Add it to /etc/fstab:

    gksudo gedit /etc/fstab
    

    Insert this at the bottom of the file:

    /path/to/swap/file  none  swap  sw  0 0
    
  4. Enable all swap, including your new swap file:

    sudo swapon -a
    

I took much of my answer from the Swap FAQ. Scroll down to the part that talks about swap files.