The mask doesn't save memory, and it adds a bit too because another full dataset will have to be loaded into memory. Programs will run faster though with a mask usually. But you can use 3dAutobox or 3dZeropad to create a new dataset that will be smaller.