Implemented memory detection