From an Alpine substrate language. The original sense is that of a pasture, the use for a building is secondary; hence no relation with Arabic مَلْجَأ (maljaʔ, “refuge”).
Esercitati a parlare e a memorizzare " malga " e molte altre parole e frasi in italiano .