You program runs in a dedicated memory space. Static variables have global scope. Given that, I suppose "Subprograms cannot share same storage" means that static variable is instantiated only once and it's the same object during the entire lifetime of the program. This has several consequences:
- If your independent functions need storage as part of their execution, they shouldn't address the same static variables because they will affect the other functions using the same variables.
- If your functions can run in parallel (e.g. on several processors) and they address same static variables, these variable become a shared resource, meaning it must be protected against parallel access (which can corrupt the data and result in incorrect behavior).
Dynamically allocated/stack variables use the same memory space in which the program runs, but they can be instantiated many times, and the instances are independent of each other. E.g., if stack variable is defined inside a function, it's allocated upon function entry and released upon function exit. If the function is entered again, new variable will be created. It's same memory space, but different stack frame in this space.