Use a long, heavy-duty leash.
Install a physical barrier, like a fence or an invisible fence.
Consider using a GPS tracker.
Never leave your malamute unattended outside.
Train the dog to know certain "boundaries."
Socialize the dog with people and other animals.
Make sure the dog has enough exercise.