If your used disk space is not excessive. To do this without reformatting, partitioning, reloading try increasing your swap space using this example:
#create a 1GB extra swap space on slice 7 using a file #called extra_swap that
#is empty but has a gigabyte allocated
mkfile 1024m /h/extra_swap
swap -a /h/extra_swap
#then add an entry to /etc/rc2.d/S01MOUNTFSYS something #like this
#around the first 5 lines
/usr/sbin/swap -a /h/extra_swap