Definition mem_ok (tp: dryThreadPool) m := 
   Smallstep.globals_not_fresh (Clight.genv_genv ge) m /\
   mem_wd2 m /\
  (forall i (CT: containsThread tp i),
      ctl_ok (Mem.nextblock m) (getThreadC CT)).

Lemma mem_ok_threadStep: forall (ms : dryThreadPool) (m : mem) (tid : nat) (m' : mem) (ev : list mem_event) (Hmem : mem_ok ms m) (Htid : containsThread ms tid) (Hcmpt : mem_compatible ms m) (c c': Clight_new.corestate) (Hcode : getThreadC Htid = Krun c) (Hcorestep : cl_evstep ge c (restrPermMap (proj1 (Hcmpt tid Htid))) ev c' m'), mem_ok (updThread Htid (Krun c') (getCurPerm m', snd (getThreadR Htid))) m'.