ps_mem.py: move to its own project