Instantiate envs and map memory
Env pgdirs?? How to write?