prepare for mem manager rewrite