Hey,

Adding the line:
@audio   -  memlock    unlimited

should be safe enough. I've set up many systems, usually that does the trick fine.

I have noticed that sometimes.. (seemingly quite random to me) some apps (like Ardour)
would warn that "memlock is unlimited" and that could *cause* lock ups, and it should be set
to something like "memlock 151832" or along those lines..  (Please dont use that number, it totatlly
depends on how much RAM your system has, and how many apps your going to be running etc etc)

Cheers, -Harry

WRT:
I updated to ubuntu 10.04 it asked me if I wanted a real-time kernel. I agreed. when I start jack I get a warning:
Memory locking is unlimited - this is dangerous. You should probably alter the line:
  @audio   -  memlock    unlimited  
in your /etc/limits.conf to read:
  @audio   -  memlock    769515