> I'm trying to read the stack of another process that has the same user
> credentials. Here is my program, I am stuck with this, it doesn't work
> for me. Printing 0's is rewrapped to '.' and you should use this program
> with hexdump like so: ./memtest [pid] | hexdump -C | less
> Sometimes I get a bit of the stack but it seems random, dunno what the
> deal is.
In OpenBSD, each process has the same 'stack space' (a large region),
but actual area in use is biased randomly up to 256K or so.
% sysctl kern.stackgap_random
kern.stackgap_random=262144