The implicit requirement that va != 0 is too restrictive. it causes multiple panics, as soon as a nil is given to a system call when we should not give that thing. I changed it to return 0 when the address is nil.