split out pathmem.h