genMemoryMap' ((a@((nom,_) ::= d2),ns):xs) prev_names ict = 
    do
      freeDead prev_names ns -- updates memorymap
      allocFor nom           -- updates memorymap
      mstate <- get
      genMemoryMap' xs ns ((a,threads nom (ct mstate)):ict) 
genMemoryMap' ((a@((nom,_) ::= d2),ns):xs) prev_names ict = 
    do
      freeDead prev_names ns -- updates memorymap
      allocFor nom           -- updates memorymap
      mstate <- get
      genMemoryMap' xs ns ((a,threads nom (ct mstate)):ict) 
genMemoryMap' ((a@((nom,_) ::= d2),ns):xs) prev_names ict = 
    do
      freeDead prev_names ns -- updates memorymap
      allocFor nom           -- updates memorymap
      mstate <- get
      genMemoryMap' xs ns ((a,threads nom (ct mstate)):ict) 