Added 'memory' check. Deprecated availableram parameter