scanmem is a debugging utility designed to isolate the address of an
arbitrary variable in an executing process. scanmem simply needs to be
told the pid of the process, and the value of the variable at several
different times.

After several scans of the process, scanmem isolates the position of the
variable and allows you to modify its value.
