I am trying to do a supervised classification using Landsat images, DEM, Slopes, NDVI, etc. Is there any way to do not exceed memory limit?
You're attempting to train using more than 1 million points. That's too many; use less points (maybe a random sample on the sampleRegions results):
var less = training.randomColumn().filter(ee.Filter.lt('random', 0.01))
Also, you almost certainly need to normalize the elevation values to a range close to 0 to 1. SVM is touchy about normalized data.