updated portalmem.c so that compiles again on pcie