Subject: Re: killed: out of swap
To: Vesbula <vesbula@yahoo.co.uk>
From: Michal Pasternak <michal@pasternak.w.lub.pl>
List: netbsd-help
Date: 01/03/2004 21:56:55
Vesbula [Sat, Jan 03, 2004 at 09:37:34PM +0000]:
> Hello, I have machine 1.6ZG, 384MB memory and no swap.

To add swap space on already partitioned disk: as root run:

   dd if=/dev/zero of=/usr/swapfile bs=1M count=[how many megabytes do you want]
   chmod 700 /usr/swapfile
   swapon /usr/swapfile

Put the last line to /etc/rc.local .

If you really want to examine the situation with your program (why does it
need so much memory), I'd suggest changing methodology (use something else,
than top; trace the program -- results after the program has finished can be
quite different, than results obtained when it is running), use profilers,
debuggers, other monitoring tools... IMO it's not worth to spend so much
time if you can add more swap :)