you can find out total ram with "sysctl hw.physmem64".
you can create a swap file and add it on the fly. eg:
# dd if=/dev/zero bs=1m count=128 of=/swap1
# swapctl -a /swap1
you'll also need to edit /etc/fstab to enable it for future boots.
.mrg.