various changes we'll later rebase

- add a comment header just like for the other impls
- describe a possible crash path when the number of processors changes
- no longer declare all vars at the function head
- on exit, add richer logging containinf filename and line