memory managment of lex process