code optimization
emalloc() must not return NULL