put the masking on the variable that changes, not the original alloc.