According to this blog post by Loren Shure, it is strongly recommended not to use non-constant static variables (e.g. read/write globals) in deployed applications.
Instead you can create a handle class to encapsulate the data, and explicitly pass the object to those functions (which has reference copy semantics).
Example:
FooData.m
classdef FooData < handle
properties
val
end
end
fun_A.m
function foo = fun_A()
foo = FooData();
foo.val = 1;
end
fun_B.m
function fun_B(foo)
disp(foo.val)
end