ENH: improving memory testing