Add memory detect