fix ep
dynamic allocate for large memory